capsicum: add CAP_PTRACE The capability will allow the ptrace(2) on the procdesc. pdfork(2): add PD_PTRACE_CAP flag If the flag is not specified, the process descriptor returned by either pdfork(2) or pdopenpid(2) has the CAP_PTRACE capability disabled. ptrace(2): add PT_PROCDESC request modifier ptrace.2: document PT_PROCDESC
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
This patch adds a capability for ptrace, and allows to do ptrace(req, procdesc, addr, data) instead of ptrace(req, pid, addr, data).
By default, the capability is not enabled, the caller of pdfork(2) or pdopenpid(2) must explicitly prepare process descriptor for debugging.
This way, the existing code that creates process descriptors and passes it somewhere, does not suddenly allow the recipient to debug the process, but it can allow if wanted.