| Main index | Section 9 | Options |
#include <sys/param.h>
#include <sys/proc.h>
The following sysctl(8) variables directly influence the behaviour of p_candebug():
| security.bsd.unprivileged_proc_debug | |
| Must be set to a non-zero value to allow unprivileged processes access to the kernel's debug facilities. | |
| kern.securelevel | |
| Debugging of the init process is not allowed if this variable is 1 or greater. | |
Other such variables indirectly influence it; see cr_bsd_visible(9).
| [EPERM] | |
| An unprivileged process attempted to debug another process but the system is configured to deny it ( see sysctl(8) variable security.bsd.unprivileged_proc_debug above ). | |
| [ESRCH] | |
| Thread td has been jailed and the process to debug does not belong to the same jail or one of its sub-jails, as determined by prison_check(9). | |
| [ESRCH] | |
| cr_bsd_visible(9) denied visibility according to the BSD security policies in force. | |
| [EPERM] | |
| Thread td lacks superuser credentials and its (effective) group set is not a superset of process p, Ns, 's whole group set (including real, effective and saved group IDs). | |
| [EPERM] | |
| Thread td lacks superuser credentials and its (effective) user ID does not match all user IDs of process p. | |
| [EPERM] | |
| Thread td lacks superuser credentials and process p is executing a set-user-ID or set-group-ID executable. | |
| [EPERM] | |
| Process p denotes the initial process initproc() and the sysctl(8) variable kern.securelevel is greater than zero. | |
| [EBUSY] | |
| Process p is in the process of being exec()'ed. | |
| [EPERM] | |
| Process p denied debuggability ( see procctl(2), command PROC_TRACE_CTL ). | |
| P_CANDEBUG (9) | August 18, 2023 |
| Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Computer science would have progressed much further and faster if all of the time and effort that has been spent maintaining and nurturing Unix had been spent on a sounder operating system. | ” |
| — The Unix Haters' handbook | ||