diff options
author | David Bright <dab@FreeBSD.org> | 2020-06-25 21:34:43 +0000 |
---|---|---|
committer | David Bright <dab@FreeBSD.org> | 2020-06-25 21:34:43 +0000 |
commit | 9b934d43602f5538bac58b32853359f9a178765e (patch) | |
tree | 4b553267b1095bb317c2dfa518470ed6e85b0028 /lib/libutil | |
parent | 9503233f8735a1267512df24473837c0aa7fc348 (diff) |
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
Notes
Notes:
svn path=/head/; revision=362634
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/pidfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c index 5b7d13083681..eaa9379267db 100644 --- a/lib/libutil/pidfile.c +++ b/lib/libutil/pidfile.c @@ -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; } |