Trouble porting mlocate

mlocate is a much better alternative to the current locate/glocate since it allows filtering of returned files by permission (it uses a common database but only lists those files to a user that he has access to). It also does differential DB updates which are much quicker.

Anyways my colleague and I have tried to get this to work under FreeBSD. The problems are mainly build related, compatibility wise it appears to have been working in the past (at least under MacOS http://chetanislazy.com/blog/2010/06/25 ... -mac-os-x/). Our experience with FreeBSD is really limited though and the maintainer of mlocate cannot really help either. For somebody with porting experience it could be a really easy fix.

Here are some resources:
 
I am well aware of that but locate is not mlocate (or slocate)

Benefits of slocate and mlocate: only display to a user the files he actually has access to (current locate is a security risk since it potentially exposes file names not accessible to the user)
Benefit of mlocate (over slocate and locate): differential database updates that can be done more frequently.

To my knowledge, there are no technical reasons why mlocate would not work once compiled correctly.
 
wojtech said:
I am well aware of that but locate is not mlocate (or slocate)
FreeBSD's locate(1) isn't the same as GNU locate either.

(current locate is a security risk since it potentially exposes file names not accessible to the user)
That may be true on Linux but I don't think this is the case for FreeBSD. From the locate(1) man page:
Code:
     The locate database is typically built by user ``nobody'' and the
     locate.updatedb(8) utility skips directories which are not readable for
     user ``nobody'', group ``nobody'', or world.  For example, if your HOME
     directory is not world-readable, none of your files are in the database.

Keep in mind that FreeBSD has its own locate(1) implementation.

http://svnweb.freebsd.org/base/head/usr.bin/locate/
 
Back
Top