ydotool
ydotool copied to clipboard
feat: look up username/groupname for socket ownership
At the moment, the uid/gid for the ydotoold socket ownership must be provided numerically.
This PR extends the socket owner string parsing with the following logic:
- Try to parse uid and gid as int
- If the entire string is consumed (i.e. it was fully numerical), treat it as uid/gid => done
- Otherwise, treat it as a username or groupname and look it up via
getpwnam/getgrnam- If the name is not found, exit
- Otherwise use the found user's uid / group's gid