summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-23 00:33:47 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-23 00:33:47 +0000
commit2dfacb3d401c0b15140e23710eead071bd60f82e (patch)
treec3aa7e76d6f59e30217d5cf64aa410aa5c4a1acd /sshd.c
parent624e3f2065690308adfeb8eaa88b3ee943f9eaad (diff)
- stevesk@cvs.openbsd.org 2002/06/22 16:40:19
[sshd.c] check /var/empty owner mode; ok provos@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index feea3ce2..d60b13d6 100644
--- a/sshd.c
+++ b/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>
@@ -1012,6 +1012,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. */