On 26/07/24 12:58, Viktor Dukhovni via Postfix-devel wrote:
Or, if, as I believe, it is sufficiently portable:
root=$(id -nu 0) || exit 1
Indeed this is fully POSIX compliant.
find ... -user "$root" ...
...as is this...
however, it gives no benefit over the equally POSIX compliant:
find ... -user 0
... The only issue with this is that you could potentially have a user
named "0", but that would also be an issue with the id command above.
Linux systems do not allow usernames that start with a digit (unless you
force the issue), but POSIX does. I don't know how many other UNIX
systems allow it. Personally my feeling is that if someone is so brain
dead as to actually name an unprivileged user "0" they will get what
they deserve and so I would personally be fine with just using find ...
-user 0 above.
Peter
_______________________________________________
Postfix-devel mailing list -- postfix-devel@postfix.org
To unsubscribe send an email to postfix-devel-le...@postfix.org