diff options
author | Darren Tucker <dtucker@zip.com.au> | 2016-06-14 10:43:53 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-06-14 10:43:53 +1000 |
commit | 0f916d39b039fdc0b5baf9b5ab0754c0f11ec573 (patch) | |
tree | b0012257c9fcc71639d13701c9456c6b016e6c87 | |
parent | 0fb7f5985351fbbcd2613d8485482c538e5123be (diff) |
Shorten prctl code a tiny bit.
-rw-r--r-- | platform.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/platform.c b/platform.c index ee3e06914..e3722e4ae 100644 --- a/platform.c +++ b/platform.c | |||
@@ -226,8 +226,7 @@ platform_disable_tracing(int strict) | |||
226 | { | 226 | { |
227 | #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) | 227 | #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) |
228 | /* Disable ptrace on Linux without sgid bit */ | 228 | /* Disable ptrace on Linux without sgid bit */ |
229 | if (prctl(PR_SET_DUMPABLE, 0) != 0) | 229 | if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict) |
230 | if (strict) | 230 | fatal("unable to make the process undumpable"); |
231 | fatal("unable to make the process undumpable"); | ||
232 | #endif | 231 | #endif |
233 | } | 232 | } |