On Thu, Jul 25, 2024 at 07:16:29PM -0400, Wietse Venema via Postfix-devel wrote:

> > 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

Or, if, as I believe, it is sufficiently portable:

    root=$(id -nu 0) || exit 1

>     find ... -user "$root" ...

(quotes added).

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

Reply via email to