Running a program through gdb without "interfering"

Dag-Erling Smørgrav des at
Fri Oct 9 19:32:51 UTC 2009

Nate Eldredge <nate at> writes:
> This won't work.  You can't debug setuid programs (for reasons which
> should be obvious).

Ah, true, but easily fixable.  Add a sysctl for it (just copy-paste the
declaration for kern.sugid_coredump and change the name) and check its
value in p_candebug() (hint: "if (credentialchanged)").

Dag-Erling Smørgrav - des at

More information about the freebsd-hackers mailing list