Add CAP_EVENT to pidfiles.
CAP_EVENT was omitted on pidfiles (in pidfile_open()). There seems no reason why a process that creates and writes a pidfile cannot monitor events on that file. This mod adds the capability. Reviewed by: cem@ MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25363
This commit is contained in:
parent
9503233f87
commit
9b934d4360
@ -196,7 +196,7 @@ pidfile_open(const char *pathp, mode_t mode, pid_t *pidptr)
|
||||
}
|
||||
|
||||
if (cap_rights_limit(fd, cap_rights_init(&caprights, CAP_PWRITE,
|
||||
CAP_FSTAT, CAP_FTRUNCATE)) < 0 &&
|
||||
CAP_FSTAT, CAP_FTRUNCATE, CAP_EVENT)) < 0 &&
|
||||
errno != ENOSYS) {
|
||||
goto failed;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user