Running a program through gdb without "interfering"

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


Nate Eldredge <nate at thatsmathematics.com> 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)").

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list