[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: overwrite any file with updatedb

On Tue, Mar 03, 1998 at 07:12:20PM +0000, Mark Baker wrote:

> > This needs to be corrected.  /etc/cron.daily/find runs as root.  That's
> > correct, but if yo u look into it, you'll find
> > 
> > 	su nobody -c "updatedb"
> > 
> > So on Debian systems it runs as 'nobody', too.
> This must be a recent change then? /etc/cron.daily/find is a conffile,
> however, so anyone who's changed it at all will probably still be using an
> old version.
> Mine still runs updatedb as root; although updatedb changes to a different
> users to do the the find, it still does the sort as root.

Well, you're probably right while i'm completely wrong.  On Debian
Systems root calls

	cd / && updatedb --localuser=nobody 2>/dev/null

while on my systems root calls:

	su locate -c "(cd /tmp; /usr/sbin/updatedb --prunepaths='$PRUNEPATHS')" 2> /dev/null

	su locate -c "(cd /tmp; /usr/sbin/updatedb --localpaths='/home/ftp/pub' --modcmd='sed -e s,/home/ftp/pub,/pub,g' --output=/var/spool/locate/locatedb.pub)" 2> /dev/null

I really had to think twice to find a plain debian system around me and
it showed me that sad truth.  I was 100% sure that I've copied the lines
from the debian `find' file (s/nobody/locate/g) a long time ago.  So I agree
to you that this _is_ a problem.



  / Martin Schulze  *  joey@infodrom.north.de  *  26129 Oldenburg  /
 / If you come from outside of Finland, you live in wrong country /
/ Featuring Debian GNU/Linux               motd von irc.funet.fi /

Attachment: pgp4X0VgBC61J.pgp
Description: PGP signature

Reply to: