git: 5cc1427b8fef - stable/15 - syslogd: Pipes need the CAP_PDGETPID right as well
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Sep 2026 15:07:55 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=5cc1427b8fef280fb08db5d6e851ab10cb5942af
commit 5cc1427b8fef280fb08db5d6e851ab10cb5942af
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-09-02 14:41:02 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-09-07 12:59:33 +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
(cherry picked from commit 87cfe4a62078bc8ff14671fde3af347e7c7e3a26)
---
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 8aed89e5dc36..8589f3ae9a12 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -3823,9 +3823,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]);
}