]> andersk Git - openssh.git/blobdiff - sshd.c
- millert@cvs.openbsd.org 2002/05/13 15:53:19
[openssh.git] / sshd.c
diff --git a/sshd.c b/sshd.c
index 589a1160d36182ba87480bde5690cdc77511cbf2..0bd64477784e58fbba50c32db9fcc6cdabce52af 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.240 2002/04/23 22:16:29 djm Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.241 2002/05/13 15:53:19 millert Exp $");
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
@@ -1331,6 +1331,14 @@ main(int ac, char **av)
 
        /* This is the child processing a new connection. */
 
+       /*
+        * Create a new session and process group since the 4.4BSD
+        * setlogin() affects the entire process group.  We don't
+        * want the child to be able to affect the parent.
+        */
+       if (setsid() < 0)
+               error("setsid: %.100s", strerror(errno));
+
        /*
         * Disable the key regeneration alarm.  We will not regenerate the
         * key since we are no longer in a position to give it to anyone. We
This page took 0.101911 seconds and 4 git commands to generate.