mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
cap_sysctl: correct typo from r347534-ish
operation & ~limit where limit is a bool is clearly not what was intended, given the line prior. Correct it to use the calculated mask for validation. The cap_sysctl tests should now be functional again.
This commit is contained in:
parent
f7810883d4
commit
b3bec79d36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353914
|
@ -316,7 +316,7 @@ sysctl_valid(const nvlist_t *nvl, bool limit)
|
|||
*/
|
||||
mask = limit ? (CAP_SYSCTL_RDWR |
|
||||
CAP_SYSCTL_RECURSIVE) : CAP_SYSCTL_RDWR;
|
||||
if ((operation & ~limit) != 0 ||
|
||||
if ((operation & ~mask) != 0 ||
|
||||
(operation & CAP_SYSCTL_RDWR) == 0)
|
||||
return (EINVAL);
|
||||
/* Only one 'operation' can be present. */
|
||||
|
|
Loading…
Reference in a new issue