diff options
Diffstat (limited to 'platform.c')
-rw-r--r-- | platform.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/platform.c b/platform.c index c68bb09c1..acf8554cd 100644 --- a/platform.c +++ b/platform.c | |||
@@ -18,14 +18,6 @@ | |||
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | 20 | ||
21 | #include <sys/types.h> | ||
22 | #if defined(HAVE_SYS_PRCTL_H) | ||
23 | #include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */ | ||
24 | #endif | ||
25 | #ifdef HAVE_PRIV_H | ||
26 | #include <priv.h> /* For setpflags() and __PROC_PROTECT */ | ||
27 | #endif | ||
28 | |||
29 | #include <stdarg.h> | 21 | #include <stdarg.h> |
30 | #include <unistd.h> | 22 | #include <unistd.h> |
31 | 23 | ||
@@ -223,18 +215,3 @@ platform_sys_dir_uid(uid_t uid) | |||
223 | #endif | 215 | #endif |
224 | return 0; | 216 | return 0; |
225 | } | 217 | } |
226 | |||
227 | void | ||
228 | platform_disable_tracing(int strict) | ||
229 | { | ||
230 | #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) | ||
231 | /* Disable ptrace on Linux without sgid bit */ | ||
232 | if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict) | ||
233 | fatal("unable to make the process undumpable"); | ||
234 | #endif | ||
235 | #if defined(HAVE_SETPFLAGS) && defined(__PROC_PROTECT) | ||
236 | /* On Solaris, we should make this process untraceable */ | ||
237 | if (setpflags(__PROC_PROTECT, 1) != 0 && strict) | ||
238 | fatal("unable to make the process untraceable"); | ||
239 | #endif | ||
240 | } | ||