summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-06-14 10:43:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-06-14 10:43:53 +1000
commit0f916d39b039fdc0b5baf9b5ab0754c0f11ec573 (patch)
treeb0012257c9fcc71639d13701c9456c6b016e6c87 /platform.c
parent0fb7f5985351fbbcd2613d8485482c538e5123be (diff)
downloadopenssh-git-0f916d39b039fdc0b5baf9b5ab0754c0f11ec573.tar.gz
Shorten prctl code a tiny bit.
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform.c b/platform.c
index ee3e0691..e3722e4a 100644
--- a/platform.c
+++ b/platform.c
@@ -226,8 +226,7 @@ platform_disable_tracing(int strict)
{
#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
/* Disable ptrace on Linux without sgid bit */
- if (prctl(PR_SET_DUMPABLE, 0) != 0)
- if (strict)
- fatal("unable to make the process undumpable");
+ if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict)
+ fatal("unable to make the process undumpable");
#endif
}