cap_fileargs: chase r346315, update fileargs_init in consumers
Reported by: ci.freebsd.org (8 times so far) MFC after: 3 weeks MFC with: r346315 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
34aff991e2
commit
d321c675ee
@ -195,7 +195,7 @@ main(int argc, char **argv)
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL);
|
cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL);
|
||||||
fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights);
|
fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
|
||||||
if (fa == NULL)
|
if (fa == NULL)
|
||||||
err(1, "Unable to initialize casper fileargs");
|
err(1, "Unable to initialize casper fileargs");
|
||||||
|
|
||||||
|
@ -1030,7 +1030,7 @@ init_caps(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
(void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL);
|
(void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL);
|
||||||
capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR,
|
capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR,
|
||||||
0, &rights);
|
0, &rights, FA_OPEN);
|
||||||
if (capfa == NULL) {
|
if (capfa == NULL) {
|
||||||
logmsg(LOG_ERR, "fileargs_init(): %m");
|
logmsg(LOG_ERR, "fileargs_init(): %m");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -133,7 +133,7 @@ main(int argc, char **argv)
|
|||||||
if (flags == O_RDWR)
|
if (flags == O_RDWR)
|
||||||
cap_rights_set(&rights, CAP_WRITE);
|
cap_rights_set(&rights, CAP_WRITE);
|
||||||
|
|
||||||
fa = fileargs_init(argc, argv, flags, 0, &rights);
|
fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN);
|
||||||
if (fa == NULL)
|
if (fa == NULL)
|
||||||
errx(1, "unable to init casper");
|
errx(1, "unable to init casper");
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ main(int argc, char *argv[])
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
fa = fileargs_init(argc, argv, O_RDONLY, 0,
|
fa = fileargs_init(argc, argv, O_RDONLY, 0,
|
||||||
cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL));
|
cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN);
|
||||||
if (fa == NULL)
|
if (fa == NULL)
|
||||||
errx(1, "unable to init casper");
|
errx(1, "unable to init casper");
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ main(int argc, char *argv[])
|
|||||||
(void)signal(SIGINFO, siginfo_handler);
|
(void)signal(SIGINFO, siginfo_handler);
|
||||||
|
|
||||||
fa = fileargs_init(argc, argv, O_RDONLY, 0,
|
fa = fileargs_init(argc, argv, O_RDONLY, 0,
|
||||||
cap_rights_init(&rights, CAP_READ, CAP_FSTAT));
|
cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN);
|
||||||
if (fa == NULL) {
|
if (fa == NULL) {
|
||||||
xo_warn("Unable to init casper");
|
xo_warn("Unable to init casper");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user