diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
commit | d1d015864103b253b3fcb2f72a0da5b0cfeb31b6 (patch) | |
tree | 22b131dceb13c3df96da594fbaadb693504797c7 /usr.bin/find | |
parent | 12d4083451fc39b3e831d4ea0bfa67d3b32cfb54 (diff) | |
parent | b6f49c23a36f329cbf1e7f28078e17fd87f0e245 (diff) | |
download | src-d1d015864103b253b3fcb2f72a0da5b0cfeb31b6.tar.gz src-d1d015864103b253b3fcb2f72a0da5b0cfeb31b6.zip |
Merge from head
Notes
Notes:
svn path=/projects/bmake/; revision=255263
Diffstat (limited to 'usr.bin/find')
-rw-r--r-- | usr.bin/find/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/find/function.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile index 0c7bb7044c02..cd10f1230454 100644 --- a/usr.bin/find/Makefile +++ b/usr.bin/find/Makefile @@ -6,4 +6,6 @@ SRCS= find.c function.c ls.c main.c misc.c operator.c option.c \ getdate.y YFLAGS= +NO_WMISSING_VARIABLE_DECLARATIONS= + .include <bsd.prog.mk> diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index 7f16a8f1892a..56d361cd575b 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -442,7 +442,8 @@ f_delete(PLAN *plan __unused, FTSENT *entry) errx(1, "-delete: forbidden when symlinks are followed"); /* Potentially unsafe - do not accept relative paths whatsoever */ - if (strchr(entry->fts_accpath, '/') != NULL) + if (entry->fts_level > FTS_ROOTLEVEL && + strchr(entry->fts_accpath, '/') != NULL) errx(1, "-delete: %s: relative path potentially not safe", entry->fts_accpath); |