1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
Secure Locate v2.4
------------------
Released November 28, 2000
Copyright (c) 1999, 2000 Kevin Lindsay, Netnation Communications Inc.,
Table of Contents
-----------------
Setting up Secure Locate Manually ................................... I
Creating the Database ............................................... II
Options ............................................................. III
Ports ............................................................... IV
Credits ............................................................. V
Author and Bugs .................................................... VI
--------------------------------------------------------------------------
I. SETTING UP SECURE LOCATE MANUALLY
---------------------------------
1. If the install script does not work, a manual setup will have to
be done. The first thing to do is copy the slocate binary to a directory
in your path. Usually the directory:
/usr/bin/
will suffice.
2. Next you must create a group called:
slocate
You can do this by either editing the /etc/group file manually or use
a group add utility. The following is supported by Linux:
groupadd slocate
3. Once the group is made you must now change the ownership and
permissions of the slocate binary. To do this execute the
following commands.
chown root:slocate /usr/bin/slocate
chmod 755 /usr/bin/slocate
chmod g+s /usr/bin/slocate
4. To make Secure Locate more convenient to use, you can symlink the GNU
locate commands to slocate. You can do the following:
Move the old version of locate to something else if it exists.
mv /usr/bin/locate /usr/bin/locate.old
mv /usr/bin/updatedb /usr/bin/updatedb.old
ln -s /usr/bin/slocate /usr/bin/locate
ln -s /usr/bin/slocate /usr/bin/updatedb
5. Then all you have to do is make sure this path exits:
/var/lib/slocate
You can do this by executing this command:
mkdir -p /var/lib/slocate
Now just give it the right ownership:
chown root:slocate /var/lib/slocate
II. CREATING THE DATABASE
---------------------
When created the database there are a few options that you may
use to customize what gets indexed and how. The database will be
stored in /var/lib/slocate/. The main two options are:
-u - Indexes every file on your system.
-U <dir> - Indexes every file in the directory <dir>.
Below are some examles of different types of indexing options:
Create an index of everyfile in every directory on your system.
slocate -u
Create an index of everyfile in the specified directory <dir>.
slocate -U <dir>
Create an index of everyfile excluding the specified files/directories,
/proc /dev and /tmp
slocate -e "/proc,/dev/,/tmp" -u
Create an index of everyfile excluding files on NFS and iso9660 type
file systems.
slocate -f "NFS,iso9660" -u
Create an index of everyfile but do not mark the database as secure.
This will cause slocate to NOT check file permissions before displaying
them to the user. This will allow every user on the system to gain
knowledge of filenames that they would not normally have access to.
The advantage to this option is to make searching faster.
slocate -l0 -u
If you symlinked /usr/bin/slocate to /usr/bin/updatedb, then executing
the updatedb command will automatically index the root filesystem starting
at '/'. This will also cause the file '/etc/updatedb.conf' to be parsed.
This file is in the same format as the original updatedb.sh configuration
file.
III. OPTIONS
-------
-u - Create slocate database starting at path /.
-U <dir> - Create slocate database starting at path <dir>.
-e <dir1,dir2,...> - Exclude directories from slocate database.
-f <fstype1,...> - Exclude files on specified file system types from
the slocate database.
-c - Force slocate to parse '/etc/updatedb.conf' when
updating the database.
-l <[01]> - Security level.
0 turns security checks off. This will make
searchs faster.
1 turns security checks on. This is the default.
-q - Quite mode. Error messages are suppressed.
-n <num> - Limit the amount of results shown to <num>.
-i - Does a case insensitive search.
-r <regexp>
--regexp=<regexp> - Search the database using a basic POSIX regular
expression.
-o <file>
--output=<file> - Specfies the database to create.
-d <path>
--database=path - Specfies path of database to search in.
-h
--help - Display this help.
-v
--verbose - Verbose mode. Display files when creating database.
-V
--version - Display version.
IV. PORTS
-----
Previous versions of Secure Locate have been known to compile on quite
a few different platforms. However, v2.0 has had some major changes
and it may not fully work on most platforms without a bit of tweaking.
Listed below are the known and tested platforms that Secure Locate
will work on.
If you manage to get Secure Locate to work on any additional platforms,
I would appreciate a patch.
v2.0
----
Linux (libc5, glibc)
FreeBSD 2.2.8
V. CREDITS
-------
Sean Mcnulty <lazy@ccf.rutgers.edu>
* Fixed a bug which caused the decode function to fail.
Ulf Betlehem <flu@iki.fi>
* multiple databases
* LOCATE_PATH environment variable support
* -o, --output options
Jim Dougharty <james.dougharty@sabre.com>
* Recursive directory walk will not exit if a directory
* cannot be read. May happen on some NFS directories.
Glen Maynard <glennm@mediaone.net>
* Multiple search strings are now possible
* Uses access() instead of opendir() to see if a directory
is readable.
R.G. Wood <rgwood@debain.org>
* Debian Package Maintainer.
Alexander V. Lukyanov" <lav@long.yar.ru>
* Fixed some performance issues that I over looked. Thanx
To Alex, slocate -u is much faster!
Matt Heckaman <matt@MLINK.NET>
* Created a patch to make Secure Locate work with FreeBSD.
Luca Berra <bluca@vodka.it>
* Added case insensitive option and optimized code to make
searching faster.
Hans-Juergen Godau <godau@wi-inf.uni-essen.de>
* Fixed a segfault when searching through more than one
database.
VI. AUTHOR AND BUGS
---------------
Author: Kevin Lindsay
Bug Reports: klindsay@mkintraweb.com
FTP: ftp://ftp.linux-geek.org/slocate/
ftp://ftp.mkintraweb.com/pub/linux/slocate/
HTTP: http://www.linux-geek.org/slocate/
|