Page MenuHomeFreeBSD

D29070.1778490579.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D29070.1778490579.diff

Index: usr.bin/find/find.c
===================================================================
--- usr.bin/find/find.c
+++ usr.bin/find/find.c
@@ -207,6 +207,9 @@
warnx("%s: %s",
entry->fts_path, strerror(entry->fts_errno));
exitstatus = 1;
+ if (entry->fts_info == FTS_DNR && isdepth) {
+ break;
+ }
continue;
#if defined(FTS_W) && defined(FTS_WHITEOUT)
case FTS_W:
Index: usr.bin/find/tests/find_test.sh
===================================================================
--- usr.bin/find/tests/find_test.sh
+++ usr.bin/find/tests/find_test.sh
@@ -65,8 +65,26 @@
atf_check -s exit:0 -o "inline:test/link2\n" find test -samefile test/link2
}
+atf_test_case find_depth_error
+find_depth_error_head()
+{
+ atf_set "descr" "Verifies that unreadable directories are still " \
+ "reported in -depth mode"
+ atf_set "require.user" "unprivileged"
+}
+find_depth_error_body()
+{
+ atf_check -s exit:0 mkdir -p test/dir
+ atf_check -s exit:0 chmod -r test/dir
+
+ # find(1) should evaluate 'link' as a symlink rather than its target
+ # (with -P / without -L flags).
+ atf_check -s exit:1 -o "inline:test/dir\ntest\n" -e ignore find test -depth
+}
+
atf_init_test_cases()
{
atf_add_test_case find_newer_link
atf_add_test_case find_samefile_link
+ atf_add_test_case find_depth_error
}

File Metadata

Mime Type
text/plain
Expires
Mon, May 11, 9:09 AM (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28672991
Default Alt Text
D29070.1778490579.diff (1 KB)

Event Timeline