summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-08-30 13:17:58 +0000
committerru <ru@FreeBSD.org>2001-08-30 13:17:58 +0000
commit9f91e74da75a91d0b6cc2fffb3282988def19091 (patch)
tree634070d280a8a877765616f5e88212f97355bdbf /usr.bin/find
parent5e1e7d4b9bbe080ab79e4ea7d4089934ba6a3bbf (diff)
downloadFreeBSD-src-9f91e74da75a91d0b6cc2fffb3282988def19091.zip
FreeBSD-src-9f91e74da75a91d0b6cc2fffb3282988def19091.tar.gz
Restore the `-perm +mode' feature.
Broken in the "close a PR" race, in revision 1.30. Note that the patch in the PR did not have this bug!
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/function.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c
index 1de472b..522d27e 100644
--- a/usr.bin/find/function.c
+++ b/usr.bin/find/function.c
@@ -557,8 +557,6 @@ f_flags(plan, entry)
/* note that plan->fl_flags always is a subset of
plan->fl_mask */
return (flags & plan->fl_mask) == plan->fl_flags;
- else if (plan->flags & F_ANY)
- return flags & plan->fl_mask;
else
return flags == plan->fl_flags;
/* NOTREACHED */
@@ -1012,6 +1010,8 @@ f_perm(plan, entry)
(S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO);
if (plan->flags & F_ATLEAST)
return (plan->m_data | mode) == mode;
+ else if (plan->flags & F_ANY)
+ return (mode & plan->m_data);
else
return mode == plan->m_data;
/* NOTREACHED */
OpenPOWER on IntegriCloud