mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00: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
This commit is contained in:
parent
d79b6b8ec2
commit
05f530f4d2
@ -141,7 +141,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 New Issue
Block a user