Date: Thu, 25 Jun 2020 21:34:44 +0000 (UTC) From: David Bright <dab@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362634 - head/lib/libutil Message-ID: <202006252134.05PLYiks052264@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dab Date: Thu Jun 25 21:34:43 2020 New Revision: 362634 URL: https://svnweb.freebsd.org/changeset/base/362634 Log: 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 Modified: head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Thu Jun 25 20:43:21 2020 (r362633) +++ head/lib/libutil/pidfile.c Thu Jun 25 21:34:43 2020 (r362634) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006252134.05PLYiks052264>