On 6/24/07, Andreas Metzler <gnu downhill.at.eu.org>
wrote:
> On 2007-04-29 James Youngman <jay gnu.org> wrote:
> > I have implemented support for the slocate
database format in both
> > updatedb and in locate (only in findutils-4.3.x).
I think it would be
> > good if Debian findutils packages could act as a
drop-in replacement
> > for slocate.
>
> > What accomodation should we make in the upstream
code to make this easy?
>
> Hello,
>
> sorry for taking along time to respond.
>
> Afaik slocate and GNU locate differ feature-wise, not
just just in
> the DB format. IIRC slocate's updatedb program runs as
superuser and
> builds a database which is only readable for the
slocate user.
GNU findutils' updatedb program can also do this if you
specify
updatedb --dbformat=slocate
> slocate
> is SUID slocate, and will only output results that the
invoking use
> would be able to see, i.e. it mirrors the filesystem's
access
> permissions.
When reading an slocate-format database, GNU locate also
does this.
GNU locate checks the default install location of the
slocate databse,
if the default (GNU) database is not present. If the
database file
in eithe of these two locations turns out to be in the
slocate format,
the access checks you mention are performed. The checks
amount to
dropping privileges and turning on the --existing flag.
Locate will
give up any privileges it has before opening any database
specified by
the user. In fact, it drops privileges immediately after
opening the
default database.
> How far does findutils 4.3.x go to duplicate this
extended
> functionality? (Including planned not yet implemented
stuff.)
AFAIK, GNU locate has all the required features to replace
the slocate
locate program. The only remaining problems, as far as I
know, are
issues of transition (i.e. essentially, package upgrade).
However, GNU updatedb is not, as far as I know,
command-line
compatible with the slocate udatedb program. Leslie Polzer
(CC'ed)
is writing an updatedb.sh replacement in C.
James.
_______________________________________________
Bug-findutils mailing list
Bug-findutils gnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils
|