mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01: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:
1 parent
5f527dbe41
commit
dbf34bbb18
1 file changed
+1
-1
+1
-1
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user