2006-12-19 00:15:57 +01:00
|
|
|
--- doc/find.texi
|
|
|
|
+++ doc/find.texi
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -3329,7 +3329,7 @@ Default is none.
|
2006-12-19 00:15:57 +01:00
|
|
|
@item --prunepaths='@var{path}@dots{}'
|
|
|
|
Directories to omit from the database, which would otherwise be
|
|
|
|
included. The environment variable @code{PRUNEPATHS} also sets this
|
|
|
|
-value. Default is @file{/tmp /usr/tmp /var/tmp /afs}. The paths are
|
|
|
|
+value. Default is @file{/tmp /usr/tmp /var/tmp /afs /var/spool}. The paths are
|
|
|
|
used as regular expressions (with @code{find ... -regex}, so you need
|
|
|
|
to specify these paths in the same way that @code{find} will encounter
|
|
|
|
them. This means for example that the paths must not include trailing
|
2008-08-04 12:31:26 +02:00
|
|
|
--- find/ftsfind.c
|
|
|
|
+++ find/ftsfind.c
|
|
|
|
@@ -388,7 +388,7 @@ consider_visiting(FTS *p, FTSENT *ent)
|
|
|
|
{
|
|
|
|
struct stat statbuf;
|
|
|
|
mode_t mode;
|
|
|
|
- int ignore, isdir;
|
|
|
|
+ int ignore;
|
|
|
|
|
|
|
|
if (options.debug_options & DebugSearch)
|
|
|
|
fprintf(stderr,
|
|
|
|
@@ -498,22 +498,6 @@ consider_visiting(FTS *p, FTSENT *ent)
|
|
|
|
|
|
|
|
/* examine this item. */
|
|
|
|
ignore = 0;
|
|
|
|
- isdir = S_ISDIR(statbuf.st_mode)
|
|
|
|
- || (FTS_D == ent->fts_info)
|
|
|
|
- || (FTS_DP == ent->fts_info)
|
|
|
|
- || (FTS_DC == ent->fts_info);
|
|
|
|
-
|
|
|
|
- if (isdir && (ent->fts_info == FTS_NSOK))
|
|
|
|
- {
|
|
|
|
- /* This is a directory, but fts did not stat it, so
|
|
|
|
- * presumably would not be planning to search its
|
|
|
|
- * children. Force a stat of the file so that the
|
|
|
|
- * children can be checked.
|
|
|
|
- */
|
|
|
|
- fts_set(p, ent, FTS_AGAIN);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (options.maxdepth >= 0)
|
|
|
|
{
|
|
|
|
if (ent->fts_level >= options.maxdepth)
|
2008-08-11 22:34:30 +02:00
|
|
|
--- find/parser.c
|
|
|
|
+++ find/parser.c
|
|
|
|
@@ -3234,7 +3234,7 @@ get_relative_timestamp (const char *str,
|
|
|
|
double sec_per_unit,
|
|
|
|
const char *overflowmessage)
|
|
|
|
{
|
|
|
|
- uintmax_t checkval;
|
|
|
|
+ double checkval;
|
|
|
|
double offset, seconds, nanosec;
|
|
|
|
|
|
|
|
if (get_comp_type(&str, &result->kind))
|
|
|
|
@@ -3259,7 +3259,7 @@ get_relative_timestamp (const char *str,
|
|
|
|
|
|
|
|
result->ts.tv_sec = origin.tv_sec - seconds;
|
|
|
|
result->ts.tv_nsec = origin.tv_nsec - nanosec;
|
|
|
|
- checkval = (uintmax_t)origin.tv_sec - seconds;
|
|
|
|
+ checkval = origin.tv_sec - seconds;
|
|
|
|
|
|
|
|
if (origin.tv_nsec < nanosec)
|
|
|
|
{
|
2006-12-19 00:15:57 +01:00
|
|
|
--- locate/updatedb.1
|
|
|
|
+++ locate/updatedb.1
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -75,8 +75,7 @@ Default is \fInfs NFS proc\fP.
|
2006-12-19 00:15:57 +01:00
|
|
|
.TP
|
|
|
|
.B \-\-output=\fIdbfile\fP
|
|
|
|
The database file to build.
|
|
|
|
-Default is system-dependent. In Debian GNU/Linux, the default
|
|
|
|
-is /var/cache/locate/locatedb.
|
|
|
|
+Default is /var/lib/locatedb.
|
|
|
|
.TP
|
|
|
|
.B \-\-localuser=\fIuser\fP
|
|
|
|
The user to search non-network directories as, using \fBsu\fP(1).
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -85,7 +84,7 @@ You can also use the environment variabl
|
2006-12-19 00:15:57 +01:00
|
|
|
.TP
|
|
|
|
.B \-\-netuser=\fIuser\fP
|
|
|
|
The user to search network directories as, using \fBsu\fP(1).
|
|
|
|
-Default is \fBdaemon\fP.
|
|
|
|
+Default is \fBnobody\fP.
|
|
|
|
You can also use the environment variable \fBNETUSER\fP to set this user.
|
|
|
|
.TP
|
|
|
|
.B \-\-old\-format
|
|
|
|
--- locate/updatedb.sh
|
|
|
|
+++ locate/updatedb.sh
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -158,7 +158,7 @@ select_shell() {
|
2006-12-19 00:15:57 +01:00
|
|
|
: ${NETPATHS=}
|
|
|
|
|
|
|
|
# Directories to not put in the database, which would otherwise be.
|
2008-03-26 16:09:55 +01:00
|
|
|
-: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /sfs /proc"}
|
|
|
|
+: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /sfs /proc /var/spool"}
|
2006-12-19 00:15:57 +01:00
|
|
|
|
|
|
|
# Trailing slashes result in regex items that are never matched, which
|
|
|
|
# is not what the user will expect. Therefore we now reject such
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -188,7 +188,7 @@ fi
|
2006-12-19 00:15:57 +01:00
|
|
|
export TMPDIR
|
|
|
|
|
|
|
|
# The user to search network directories as.
|
|
|
|
-: ${NETUSER=daemon}
|
|
|
|
+: ${NETUSER=nobody}
|
|
|
|
|
|
|
|
# The directory containing the subprograms.
|
|
|
|
if test -n "$LIBEXECDIR" ; then
|
2008-03-26 16:09:55 +01:00
|
|
|
@@ -228,11 +228,10 @@ done
|
2006-12-19 00:15:57 +01:00
|
|
|
|
|
|
|
PATH=/bin:/usr/bin:${BINDIR}; export PATH
|
|
|
|
|
|
|
|
-: ${PRUNEFS="nfs NFS proc afs proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"}
|
2007-03-01 22:17:26 +01:00
|
|
|
+: ${PRUNEFS="nfs NFS nfs4 afs proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs cifs 9P"}
|
2006-12-19 00:15:57 +01:00
|
|
|
|
|
|
|
if test -n "$PRUNEFS"; then
|
|
|
|
-prunefs_exp=`echo $PRUNEFS |sed -e 's/\([^ ][^ ]*\)/-o -fstype \1/g' \
|
|
|
|
- -e 's/-o //' -e 's/$/ -o/'`
|
|
|
|
+ prunefs_exp=`echo $PRUNEFS |sed -e 's/\([^ ][^ ]*\)/-fstype \1 -o/g'`
|
|
|
|
else
|
|
|
|
prunefs_exp=''
|
|
|
|
fi
|
2008-09-05 20:08:03 +02:00
|
|
|
@@ -252,13 +251,12 @@ if test -n "$SEARCHPATHS"; then
|
|
|
|
# : A1
|
|
|
|
su $LOCALUSER `select_shell $LOCALUSER` -c \
|
|
|
|
"$find $SEARCHPATHS $FINDOPTIONS \
|
|
|
|
- \\( $prunefs_exp \
|
|
|
|
- -type d -regex '$PRUNEREGEX' \\) -prune -o $print_option"
|
|
|
|
+ -type d \\( $prunefs_exp -regex '$PRUNEREGEX' \\) -prune \
|
|
|
|
+ -o $print_option"
|
|
|
|
else
|
|
|
|
# : A2
|
|
|
|
$find $SEARCHPATHS $FINDOPTIONS \
|
|
|
|
- \( $prunefs_exp \
|
|
|
|
- -type d -regex "$PRUNEREGEX" \) -prune -o $print_option
|
|
|
|
+ -type d \( $prunefs_exp -regex "$PRUNEREGEX" \) -prune -o $print_option
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
@@ -321,13 +319,13 @@ if test -n "$SEARCHPATHS"; then
|
|
|
|
# : A5
|
|
|
|
su $LOCALUSER `select_shell $LOCALUSER` -c \
|
|
|
|
"$find $SEARCHPATHS $FINDOPTIONS \
|
|
|
|
- \( $prunefs_exp \
|
|
|
|
- -type d -regex '$PRUNEREGEX' \) -prune -o $print_option" || exit $?
|
|
|
|
+ -type d \( $prunefs_exp -regex '$PRUNEREGEX' \) -prune \
|
|
|
|
+ -o $print_option" || exit $?
|
|
|
|
else
|
|
|
|
# : A6
|
|
|
|
$find $SEARCHPATHS $FINDOPTIONS \
|
|
|
|
- \( $prunefs_exp \
|
|
|
|
- -type d -regex "$PRUNEREGEX" \) -prune -o $print_option || exit $?
|
|
|
|
+ -type d \( $prunefs_exp -regex "$PRUNEREGEX" \) -prune \
|
|
|
|
+ -o $print_option || exit $?
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|