1
# Description: Disable ptrace() and core dumping for programs using libpolkit
2
# Ubuntu: https://wiki.ubuntu.com/DesktopTeam/Specs/PolicyKitIntegration
3
# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=13742
5
--- policykit-0.7/src/polkit/polkit-policy-default.c 2007-11-28 22:22:52.000000000 +0100
6
+++ policykit-0.7.new/src/polkit/polkit-policy-default.c 2007-12-31 18:14:45.000000000 +0100
11
+#include <sys/prctl.h>
13
#include "polkit-debug.h"
14
#include "polkit-error.h"
18
#endif /* POLKIT_BUILD_TESTS */
21
+ * Library constructor: Disable ptrace() and core dumping for applications
22
+ * which use this library, so that local trojans cannot silently abuse PK
23
+ * privileges. (This is a just a bandaid, not a robust solution).
25
+__attribute__ ((constructor))
28
+ prctl(PR_SET_DUMPABLE, 0);