summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-06-22 16:40:20 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-06-22 16:40:20 +0000
commit9dcb2f83b08585353eb00a6adb5b495ecfb1881b (patch)
tree52973fbcd0e7edce0f3fa4476a689d71c50de161
parentcaed37e32e6a9e45b17b42adf5e44b85a5243423 (diff)
check /var/empty owner mode; ok provos@
-rw-r--r--usr.bin/ssh/sshd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 0f04704f141..b8671e966a8 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.246 2002/06/20 23:05:56 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.247 2002/06/22 16:40:19 stevesk Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -983,6 +983,9 @@ main(int ac, char **av)
(S_ISDIR(st.st_mode) == 0))
fatal("Missing privilege separation directory: %s",
_PATH_PRIVSEP_CHROOT_DIR);
+ if (st.st_uid != 0 || (st.st_mode & (S_IWGRP|S_IWOTH)) != 0)
+ fatal("Bad owner or mode for %s",
+ _PATH_PRIVSEP_CHROOT_DIR);
}
/* Configuration looks good, so exit if in test mode. */