On Thu, Jul 25, 2024 at 10:39:48PM -0300, wagner riffel wrote:

> Viktor Dukhovni via Postfix-devel <postfix-devel@postfix.org> wrote:
> > Or, if, as I believe, it is sufficiently portable:
> > 
> >     root=$(id -nu 0) || exit 1
> > 
> > >     find ... -user "$root" ...
> > 
> > (quotes added).
> 
> I tested this too before that ls hack, this doesn't work when there's a user
> named "0" in the system, at least in my system id it reports the name for the
> user "0" not root (id (GNU coreutils) 9.5).

That's a rather odd corner case, even less likely IMHO than a missing
"root" user.  I'm not too worried about it.  Frankly, just add "root" to
your "passwd" file, and move on.

However we could instead write "-user 0", which will work on systems
where the user with uid 0 is called something other than "root".  As
for systems with a spurious user "0", too bad IMNSHO.  However, I'm
disinclined to recommend any changes to the current code.

-- 
    Viktor.
_______________________________________________
Postfix-devel mailing list -- postfix-devel@postfix.org
To unsubscribe send an email to postfix-devel-le...@postfix.org

Reply via email to