List Info

Thread: slocate support in GNU findutils




slocate support in GNU findutils
user name
2007-04-29 08:00:41
Andreas,

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?

James.


_______________________________________________
Bug-findutils mailing list
Bug-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

Re: slocate support in GNU findutils
user name
2007-06-24 11:58:22
On 2007-04-29 James Youngman <jaygnu.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. 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.

How far does findutils 4.3.x go to duplicate this extended
functionality? (Including planned not yet implemented
stuff.)
cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other
friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


_______________________________________________
Bug-findutils mailing list
Bug-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

Re: slocate support in GNU findutils
user name
2007-06-24 13:03:34
On 6/24/07, Andreas Metzler <gnudownhill.at.eu.org>
wrote:
> On 2007-04-29 James Youngman <jaygnu.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-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

[1-3]

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