Disallow ptrace on greeter and kcheckpass process on FreeBSD

Authored by tcberner on Mar 29 2016, 4:25 PM.

Description

Disallow ptrace on greeter and kcheckpass process on FreeBSD

Summary:
Use FreeBSDs procctl to disable gdb&Co from attaching to kscreenlocker and kcheckpass.

Test Plan:
Testing done:

% gdb --pid <pid of kscreenlocker with --testing>
Result
    successfully attached

# gdb --pid <pid of kscreenlocker>
Result
    successfully attached

% gdb --pid <pid of kscreenlocker>
Result
    Attaching to process <pid of kscreenlocker>
    ptrace: Operation not permitted.

Reviewers: rakuco, graesslin

Subscribers: plasma-devel

Projects: Plasma

Differential Revision: https://phabricator.kde.org/D1216