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!
This commit is contained in:
Ruslan Ermilov 2001-08-30 13:17:58 +00:00
parent a56f87b1c5
commit c0ff9709a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82569

View File

@ -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 */