Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102829891
D40679.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40679.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D40679: ktrace: Record signal violations with KTR_CAPFAIL
Attached
Detach File
Event Timeline
Log In to Comment