summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-08-24 03:01:06 +1000
committerDamien Miller <djm@mindrot.org>2014-08-24 03:01:06 +1000
commit9c1dede005746864a4fdb36a7cdf6c51296ca909 (patch)
tree0fdd9ca2bab2acec1b9652a470e4ca254396ca7c /sftp-server.c
parentd244a5816fd1312a33404b436e4dd83594f1119e (diff)
- (djm) [sftp-server.c] Some systems (e.g. Irix) have prctl() but not
PR_SET_DUMPABLE, so adjust ifdef; reported by Tom Christensen
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sftp-server.c b/sftp-server.c
index 77834117..0177130c 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1526,7 +1526,7 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
log_init(__progname, log_level, log_facility, log_stderr);
-#ifdef HAVE_PRCTL
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
/*
* On Linux, we should try to avoid making /proc/self/{mem,maps}
* available to the user so that sftp access doesn't automatically
@@ -1535,7 +1535,7 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
*/
if (prctl(PR_SET_DUMPABLE, 0) != 0)
fatal("unable to make the process undumpable");
-#endif
+#endif /* defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) */
if ((cp = getenv("SSH_CONNECTION")) != NULL) {
client_addr = xstrdup(cp);