wagner riffel via Postfix-devel:
> I have a system which the root user name is not root, that makes those "find
> -user root" commands spam false positives at postfix startup, It would be
> possible to change to "-user 0" instead, but that would generate false
> positives
> whenever there's a user named 0 in the system. In this system there's -uid
> option in find (coreutils find), but I found that this option is not in POSIX
> find manual thus I assume it would break the script on BSDs systems. (I didn't
> tested this patch in such system tho)
>
> The patch is a little clumsy and inefficient since it needs to exec ls for
> every
> file it finds, but there's not many of them and in my tests it didn't impact
> the
> overall startup time. I'm not very skilled writing portable scripts so if you
> better, let know.
What about using the the super-user's name in the pasword file?
root=`awk -F: '$3 == 0 { print $1; exit }' /etc/passwd` || exit 1
find ... -user $root ...
I think that we can still count on /etc/passwd to exist.
Wietse
_______________________________________________
Postfix-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]