git: c09ee2f0cca6 - stable/15 - pdopenpid(2): in cap mode, translate all errors from pdopenpid1() to ECAPMODE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Sep 2026 00:35:32 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=c09ee2f0cca6b7ce34d98dc8cc31cafa34fb9322
commit c09ee2f0cca6b7ce34d98dc8cc31cafa34fb9322
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-28 17:54:02 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-09-05 00:33:42 +0000
pdopenpid(2): in cap mode, translate all errors from pdopenpid1() to ECAPMODE
(cherry picked from commit 326ab530dcabe70ab48728cad0465f35b30dbf60)
---
sys/kern/sys_procdesc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c
index b9329cd38088..774774bdf4f0 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -728,7 +728,10 @@ kern_pdopenpid(struct thread *td, pid_t pid, int flags)
fp->f_pdflags |= F_PD_NOKILL | F_PD_NOFINSTALL;
filecaps_free(&fcaps);
}
+ } else if (IN_CAPABILITY_MODE(td)) {
+ error = ECAPMODE;
}
+
fdrop(fp, td);
if (pdf != NULL) {