Date: Wed, 15 Jul 2020 17:34:08 +0000 (UTC) From: David Bright <dab@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363231 - stable/12/lib/libutil Message-ID: <202007151734.06FHY8mg072502@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007151734.06FHY8mg072502>