On Wed, Jul 29, 2026 at 06:47:00PM +0200, Andreas Metzler wrote:
> On 2026-07-29 Andrew Bower <[email protected]> wrote:
> > I reproduced this condition absent systemd by running:
> >
> >   unshare --mount
> >   mount -o ro /var/log /var/log
> >   /etc/cron.daily/locate systemd-timer

For completeness, my reproducer was missing "--bind" to the mount
command.

> > 3. The real worker, /usr/bin/updatedb.findutils, uses 'su' to become
> > 'nobody'. This is not the right way to drop privileges. su is designed
> > for human users, for a start. util-linux ships with 'runuser' which is
> > more suitable for system scripts, has a minimal pam configuration and
> > does not reproduce this problem! I tried this and it works, although it
> > would need to be considered carefully by the 'locate' maintainers for
> > unintended consequences.
> >
> > I suggest this is fixed via a shell function which falls back to 'su' so
> > that 'locate' can still run on hurd (where there is no systemd anyway).
> 
> I do not get hurd issue, while hurd has no systemd it still has runuser.

Indeed. I falsely assumed that not being Linux, hurd had an alternative
to util-linux that probably didn't have runuser. It seems a direct
substitution would work for the whole of Debian!

> d)'s "runas" is a typo, and should read "runuser", shouldn't it? (runas
> exist, but is very niche and looks dead upstream)

Yes, I meant to write 'runuser' but the 'runas' Windowsism crept in.

> > I think 'locate' is probably the most accurate home for this bug!
> 
> agreed.

Thanks.

Reply via email to