summaryrefslogtreecommitdiffstats
path: root/sys/sys/procctl.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-18 15:13:11 +0000
committerkib <kib@FreeBSD.org>2015-01-18 15:13:11 +0000
commitaa0ac99391af2cc2286fadd774dc5cf9f2edb7a6 (patch)
tree406845e7428cb2139db4e8afc4299216a84a92a7 /sys/sys/procctl.h
parent53832db395278d76a34a15ca534f509564a51dc5 (diff)
downloadFreeBSD-src-aa0ac99391af2cc2286fadd774dc5cf9f2edb7a6.zip
FreeBSD-src-aa0ac99391af2cc2286fadd774dc5cf9f2edb7a6.tar.gz
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process. Note that the command is not intended to be a security measure, rather it is an obfuscation feature, implemented for parity with other operating systems. Discussed with: jilles, rwatson Man page fixes by: rwatson Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/sys/procctl.h')
-rw-r--r--sys/sys/procctl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/procctl.h b/sys/sys/procctl.h
index d11b2b2..c57eee6 100644
--- a/sys/sys/procctl.h
+++ b/sys/sys/procctl.h
@@ -41,6 +41,8 @@
#define PROC_REAP_STATUS 4 /* reaping status */
#define PROC_REAP_GETPIDS 5 /* get descendants */
#define PROC_REAP_KILL 6 /* kill descendants */
+#define PROC_TRACE_CTL 7 /* en/dis ptrace and coredumps */
+#define PROC_TRACE_STATUS 8 /* query tracing status */
/* Operations for PROC_SPROTECT (passed in integer arg). */
#define PPROT_OP(x) ((x) & 0xf)
@@ -96,6 +98,10 @@ struct procctl_reaper_kill {
#define REAPER_KILL_CHILDREN 0x00000001
#define REAPER_KILL_SUBTREE 0x00000002
+#define PROC_TRACE_CTL_ENABLE 1
+#define PROC_TRACE_CTL_DISABLE 2
+#define PROC_TRACE_CTL_DISABLE_EXEC 3
+
#ifndef _KERNEL
__BEGIN_DECLS
int procctl(idtype_t, id_t, int, void *);
OpenPOWER on IntegriCloud