summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-06 20:46:25 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-06 20:46:25 +0000
commita26ea63f8acd883603de9f780f1ff05775e51f78 (patch)
tree606d4ca7380deb66d5c59c9556ccbb3b54d7511d
parent20abb75f53d64718827cf2c0547fc3db443fa1b9 (diff)
- markus@cvs.openbsd.org 2002/05/29 11:21:57
[sshd.c] don't start if privsep is enabled and SSH_PRIVSEP_USER or _PATH_PRIVSEP_CHROOT_DIR are missing; ok deraadt@
-rw-r--r--ChangeLog6
-rw-r--r--sshd.c15
2 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bc1e3dc4..d20ad9129 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,10 @@
50 - stevesk@cvs.openbsd.org 2002/05/29 03:06:30 50 - stevesk@cvs.openbsd.org 2002/05/29 03:06:30
51 [ssh.1 sshd.8] 51 [ssh.1 sshd.8]
52 spelling 52 spelling
53 - markus@cvs.openbsd.org 2002/05/29 11:21:57
54 [sshd.c]
55 don't start if privsep is enabled and SSH_PRIVSEP_USER or
56 _PATH_PRIVSEP_CHROOT_DIR are missing; ok deraadt@
53 57
5420020604 5820020604
55 - (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed 59 - (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
@@ -734,4 +738,4 @@
734 - (stevesk) entropy.c: typo in debug message 738 - (stevesk) entropy.c: typo in debug message
735 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 739 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
736 740
737$Id: ChangeLog,v 1.2159 2002/06/06 20:45:33 mouring Exp $ 741$Id: ChangeLog,v 1.2160 2002/06/06 20:46:25 mouring Exp $
diff --git a/sshd.c b/sshd.c
index 437e0f970..2f810b9c1 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.243 2002/05/22 23:18:25 deraadt Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.244 2002/05/29 11:21:57 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1001,6 +1001,19 @@ main(int ac, char **av)
1001 } 1001 }
1002 } 1002 }
1003 1003
1004 if (use_privsep) {
1005 struct passwd *pw;
1006 struct stat st;
1007
1008 if ((pw = getpwnam(SSH_PRIVSEP_USER)) == NULL)
1009 fatal("Privilege separation user %s does not exist",
1010 SSH_PRIVSEP_USER);
1011 if ((stat(_PATH_PRIVSEP_CHROOT_DIR, &st) == -1) ||
1012 (S_ISDIR(st.st_mode) == 0))
1013 fatal("Missing privilege separation directory: %s",
1014 _PATH_PRIVSEP_CHROOT_DIR);
1015 }
1016
1004 /* Configuration looks good, so exit if in test mode. */ 1017 /* Configuration looks good, so exit if in test mode. */
1005 if (test_flag) 1018 if (test_flag)
1006 exit(0); 1019 exit(0);