From 2dfacb3d401c0b15140e23710eead071bd60f82e Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Sun, 23 Jun 2002 00:33:47 +0000 Subject: - stevesk@cvs.openbsd.org 2002/06/22 16:40:19 [sshd.c] check /var/empty owner mode; ok provos@ --- sshd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index feea3ce2c..d60b13d66 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 #include @@ -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. */ -- cgit v1.2.3