svn commit: r363231 - stable/12/lib/libutil

David Bright dab at FreeBSD.org
Wed Jul 15 17:34:10 UTC 2020


Author: dab
Date: Wed Jul 15 17:34:08 2020
New Revision: 363231
URL: https://svnweb.freebsd.org/changeset/base/363231

Log:
  MFC r362634:
  
  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.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  stable/12/lib/libutil/pidfile.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libutil/pidfile.c
==============================================================================
--- stable/12/lib/libutil/pidfile.c	Wed Jul 15 17:24:39 2020	(r363230)
+++ stable/12/lib/libutil/pidfile.c	Wed Jul 15 17:34:08 2020	(r363231)
@@ -196,7 +196,7 @@ pidfile_open(const char *pathp, mode_t mode, pid_t *pi
 	}
 
 	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;
 	}


More information about the svn-src-stable-12 mailing list