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:
ru 2001-08-30 13:17:58 +00:00
parent 3145704e81
commit 907a5b0bd3

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