mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
cat: fix cap_rights_init usage
Capability rights passed to cap_rights_* are not simple bitmaks and
cannot be ORed together in general (although it will work for certain
subsets of rights).
PR: 277057
Reported by: asomers, markj
(cherry picked from commit 05f530f4d2)
This commit is contained in:
parent
5f527dbe41
commit
dbf34bbb18
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ init_casper(int argc, char *argv[])
|
|||
err(EXIT_FAILURE, "unable to create Casper");
|
||||
|
||||
fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0,
|
||||
cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL | CAP_SEEK),
|
||||
cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL, CAP_SEEK),
|
||||
FA_OPEN | FA_REALPATH);
|
||||
if (fa == NULL)
|
||||
err(EXIT_FAILURE, "unable to create fileargs");
|
||||
|
|
|
|||
Loading…
Reference in a new issue