History log of /freebsd/usr.bin/find/function.c (Results 26 – 50 of 213)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2545695e 13-Apr-2014 Christian Brueffer <brueffer@FreeBSD.org>

Avoid double free in f_acl().

CID: 1018508
Found with: Coverity Prevent(tm)
MFC after: 1 week


# b547523e 13-Apr-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Return normal exit status from -quit.

If there was an error, make the exit status reflect this even if -quit
caused the exit. Formerly, -quit always caused exit(0).

GNU find does the same.


# 7a79617c 13-Apr-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Correctly propagate -exec/-execdir ... {} + exit status.

As per POSIX, the -exec ... {} + primary always returns true, but a non-zero
exit status causes find to return a non-zero exit status i

find: Correctly propagate -exec/-execdir ... {} + exit status.

As per POSIX, the -exec ... {} + primary always returns true, but a non-zero
exit status causes find to return a non-zero exit status itself. GNU does
the same, and also for -execdir ... {} +.

It does not make much sense to return false from the primary only when the
child process happens to be run.

The behaviour for -exec/-execdir ... ; remains unchanged: the primary
returns true or false depending on the exit status, and find's exit status
is unaffected.

show more ...


# 1709ccf9 29-Mar-2014 Martin Matuska <mm@FreeBSD.org>

Merge head up to r263906.


# cf599562 16-Mar-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: When performing -quit, finish pending -exec ... + command lines.

This avoids unexpected partial processing when a find command uses both
-quit and -exec ... +.

GNU find does the same.

MFC af

find: When performing -quit, finish pending -exec ... + command lines.

This avoids unexpected partial processing when a find command uses both
-quit and -exec ... +.

GNU find does the same.

MFC after: 1 week

show more ...


# 5748b897 19-Feb-2014 Martin Matuska <mm@FreeBSD.org>

Merge head up to r262222 (last merge was incomplete).


# 4f18ae67 19-Jan-2014 Glen Barber <gjb@FreeBSD.org>

MFH: Tracking commit (r260891)

Sponsored by: The FreeBSD Foundation


Revision tags: release/10.0.0
# b95de98a 11-Jan-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Allow -type d without statting everything.

fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into
them).

No functional change is intended, but find commands that use -type

find: Allow -type d without statting everything.

fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into
them).

No functional change is intended, but find commands that use -type d but no
primaries that still require stat/lstat calls make considerably fewer system
calls.

show more ...


# e01ff621 09-Jan-2014 Glen Barber <gjb@FreeBSD.org>

MFH: tracking commit (head@r260486)

Sponsored by: The FreeBSD Foundation


# e810bef7 06-Jan-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Fix two more problems with -lname and -ilname:

* Do not match symlinks that are followed because of -H or -L. This is
explicitly documented in GNU find's info file and is like -type l.

* Fi

find: Fix two more problems with -lname and -ilname:

* Do not match symlinks that are followed because of -H or -L. This is
explicitly documented in GNU find's info file and is like -type l.

* Fix matching symlinks in subdirectories when fts changes directories.

Also, avoid some readlink() calls on files that are obviously not symlinks
(because of fts(3) restrictions, not all of them).

MFC after: 1 week

show more ...


# 3e02329a 05-Jan-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Fix -lname and -ilname.

The code did not take into account that readlink() does not add a
terminating '\0', and therefore did not work reliably.

As before, symlinks of length PATH_MAX or more

find: Fix -lname and -ilname.

The code did not take into account that readlink() does not add a
terminating '\0', and therefore did not work reliably.

As before, symlinks of length PATH_MAX or more are not handled correctly.
(These can only be created on other operating systems.)

PR: bin/185393
Submitted by: Ben Reser (original version)
MFC after: 1 week

show more ...


# 0bfd163f 18-Oct-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge head r233826 through r256722.


# 1ccca3b5 10-Oct-2013 Alan Somers <asomers@FreeBSD.org>

IFC @256277

Approved by: ken (mentor)


Revision tags: release/9.2.0
# d1d01586 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge from head


# 46ed9e49 04-Sep-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r255209


# 40f65a4d 07-Aug-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r254014


# 9d6d5a71 02-Aug-2013 Jilles Tjoelker <jilles@FreeBSD.org>

find: Allow -delete to delete files given as arguments.

Formerly, a command like find dir1/dir2 -delete would delete everything
under dir1/dir2 but not dir1/dir2 itself.

When -L is not specified an

find: Allow -delete to delete files given as arguments.

Formerly, a command like find dir1/dir2 -delete would delete everything
under dir1/dir2 but not dir1/dir2 itself.

When -L is not specified and "." can be opened, the fts(3) code underlying
find(1) is careful to avoid following symlinks or being dropped in different
locations by moving the directory fts is currently traversing. If a
problematic concurrent modification is detected, fts will not enter the
directory or abort. Files found in the search are returned via the current
working directory and a pathname not containing a slash.

For paranoia, find(1) verifies this when -delete is used. However, it is too
paranoid about the root of the traversal. It is already assumed that the
initial pathname does not refer to directories or symlinks that might be
replaced by untrusted users; otherwise, the whole traversal would be unsafe.
Therefore, it is not necessary to do the check for fts_level ==
FTS_ROOTLEVEL.

Deleting the pathnames given as arguments can be prevented without error
messages using -mindepth 1 or by changing directory and passing "." as
argument to find. This works in the old as well as the new version of find.

Tested by: Kurt Lidl
Reviewed by: jhb

show more ...


# 552311f4 17-Jul-2013 Xin LI <delphij@FreeBSD.org>

IFC @253398


# cfe30d02 19-Jun-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge fresh head.


Revision tags: release/8.4.0
# 69e6d7b7 12-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

sync from head


# 876a84e8 18-Mar-2013 Martin Matuska <mm@FreeBSD.org>

MFC @248461


# ddd956b0 17-Mar-2013 Jilles Tjoelker <jilles@FreeBSD.org>

find: Include nanoseconds when comparing timestamps of files.

When comparing to the timestamp of a given file using -newer, -Xnewer and
-newerXY (where X and Y are one of m, c, a, B), include nanose

find: Include nanoseconds when comparing timestamps of files.

When comparing to the timestamp of a given file using -newer, -Xnewer and
-newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the
comparison.

The primaries that compare a timestamp of a file to a given value (-Xmin,
-Xtime, -newerXt) continue to compare times in whole seconds.

Note that the default value 0 of vfs.timestamp_precision almost always
causes the nanoseconds part to be 0. However, touch -d can set a timestamp
to the microsecond regardless of that sysctl.

MFC after: 1 week

show more ...


# 23c07ad6 04-Mar-2013 Martin Matuska <mm@FreeBSD.org>

MFC @247774


# 9ed0c92c 03-Mar-2013 David Malone <dwmalone@FreeBSD.org>

Add an option for finding sparse files.

Reviewed by: iedowse
MFC after: 3 weeks


# d241a0e6 26-Feb-2013 Xin LI <delphij@FreeBSD.org>

IFC @247348.


123456789