List Info

Thread: 'locate' broken two months ago?




'locate' broken two months ago?
user name
2006-04-23 02:28:20
I'd like someone to confirm this, but it appears to me that
'locate' --
or, more precisely, locate.updatedb -- has been broken since
26 February.

The change made 'locate' exit if 'find' returned any
error indication.
But it's guaranteed to do so, since it runs as 'nobody'
and when 'find'
encounters unreadable directories (of which there are
several in the base
system) it ultimately exits with a non-zero return code.

The amusing thing is that it took me two months to notice --
well, 6
weeks, since I didn't update my systems immediately.

		--Steven M. Bellovin, http://www.cs.columbi
a.edu/~smb
'locate' broken two months ago?
user name
2006-04-23 02:41:26
On Sat, Apr 22, 2006 at 10:28:20PM -0400, Steven M. Bellovin
wrote:
> I'd like someone to confirm this, but it appears to me
that 'locate' --
> or, more precisely, locate.updatedb -- has been broken
since 26 February.
> 
> The change made 'locate' exit if 'find' returned
any error indication.
> But it's guaranteed to do so, since it runs as
'nobody' and when 'find'
> encounters unreadable directories (of which there are
several in the base
> system) it ultimately exits with a non-zero return
code.
> 
> The amusing thing is that it took me two months to
notice -- well, 6
> weeks, since I didn't update my systems immediately.
> 

Yes, I can confirm this.  locate.updatedb
"works" if run as root, but
since weekly runs it as:
	nice -5 su -m nobody -c /usr/libexec/locate.updatedb
the process runs for a very short time before exiting,
resulting in a
locate database that has not been updated.

Jeff
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )