git: 87cfe4a62078 - main - syslogd: Pipes need the CAP_PDGETPID right as well
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Sep 2026 19:34:19 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=87cfe4a62078bc8ff14671fde3af347e7c7e3a26
commit 87cfe4a62078bc8ff14671fde3af347e7c7e3a26
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-09-02 14:41:02 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-09-02 19:33:56 +0000
syslogd: Pipes need the CAP_PDGETPID right as well
While here, use caph_rights_limit(), as syslogd already uses
caph_enter().
PR: 298104
Reported by: mi
Fixes: 24816abb8740 ("syslogd: Limit rights on procdescs")
MFC after: 3 days
---
usr.sbin/syslogd/syslogd.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index f12013c1f316..48b92f2ea03e 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -3829,9 +3829,10 @@ p_open(const char *prog, int *rpd)
"behaviour.", pid);
}
- if (cap_rights_limit(pd,
- cap_rights_init(&rights, CAP_PDKILL, CAP_EVENT)) == -1)
- err(1, "cap_rights_limit");
+ if (caph_rights_limit(pd,
+ cap_rights_init(&rights, CAP_PDKILL, CAP_EVENT, CAP_PDGETPID)) ==
+ -1)
+ err(1, "caph_rights_limit");
*rpd = pd;
return (pfd[1]);
}