Page MenuHomeFreeBSD

D40679.diff
No OneTemporary

D40679.diff

diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c
--- a/sys/kern/kern_procctl.c
+++ b/sys/kern/kern_procctl.c
@@ -27,6 +27,8 @@
* SUCH DAMAGE.
*/
+#include "opt_ktrace.h"
+
#include <sys/param.h>
#include <sys/_unrhdr.h>
#include <sys/systm.h>
@@ -542,6 +544,8 @@
rk = data;
sx_assert(&proctree_lock, SX_LOCKED);
+ if (CAP_TRACING(td))
+ ktrcapfail(CAPFAIL_SIGNAL, &rk->rk_sig);
if (IN_CAPABILITY_MODE(td))
return (ECAPMODE);
if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG ||
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1906,8 +1906,12 @@
* The main rationale behind this is that abort(3) is implemented as
* kill(getpid(), SIGABRT).
*/
- if (IN_CAPABILITY_MODE(td) && pid != td->td_proc->p_pid)
- return (ECAPMODE);
+ if (pid != td->td_proc->p_pid) {
+ if (CAP_TRACING(td))
+ ktrcapfail(CAPFAIL_SIGNAL, &signum);
+ if (IN_CAPABILITY_MODE(td))
+ return (ECAPMODE);
+ }
AUDIT_ARG_SIGNUM(signum);
AUDIT_ARG_PID(pid);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 5:41 PM (22 h, 21 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14701799
Default Alt Text
D40679.diff (1 KB)

Event Timeline