]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2005/12/24 02:27:41
authordjm <djm>
Sat, 24 Dec 2005 03:59:12 +0000 (03:59 +0000)
committerdjm <djm>
Sat, 24 Dec 2005 03:59:12 +0000 (03:59 +0000)
     [session.c sshd.c]
     eliminate some code duplicated in privsep and non-privsep paths, and
     explicitly clear SIGALRM handler; "groovy" deraadt@

ChangeLog
session.c
sshd.c

index d851ba9bdddb529034fa4efd8ad19df33e1719ee..214813e3da50f037edcb9c710ecc559e54256bab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - jmc@cvs.openbsd.org 2005/12/23 23:46:23
      [ssh.1]
      less mark up for -c;
+   - djm@cvs.openbsd.org 2005/12/24 02:27:41
+     [session.c sshd.c]
+     eliminate some code duplicated in privsep and non-privsep paths, and
+     explicitly clear SIGALRM handler; "groovy" deraadt@
 
 20051220
  - (dtucker) OpenBSD CVS Sync
index 8826fabaa401ba21670e19b909a97548b62bf607..2bf9044048b6b97d324353f9aebcc16107ff94ff 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.190 2005/12/17 21:13:05 stevesk Exp $");
+RCSID("$OpenBSD: session.c,v 1.191 2005/12/24 02:27:41 djm Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -209,15 +209,6 @@ do_authenticated(Authctxt *authctxt)
 {
        setproctitle("%s", authctxt->pw->pw_name);
 
-       /*
-        * Cancel the alarm we set to limit the time taken for
-        * authentication.
-        */
-       alarm(0);
-       if (startup_pipe != -1) {
-               close(startup_pipe);
-               startup_pipe = -1;
-       }
        /* setup the channel layer */
        if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
                channel_permit_all_opens();
diff --git a/sshd.c b/sshd.c
index f0fdf5a835b9f90a941d1f7bb91c0f162d21cba1..def90d827a2b34ef465f5db723e007ea979f464c 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.317 2005/10/30 08:52:18 djm Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.318 2005/12/24 02:27:41 djm Exp $");
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
@@ -637,13 +637,6 @@ privsep_postauth(Authctxt *authctxt)
                goto skip;
        }
 
-       /* Authentication complete */
-       alarm(0);
-       if (startup_pipe != -1) {
-               close(startup_pipe);
-               startup_pipe = -1;
-       }
-
        /* New socket pair */
        monitor_reinit(pmonitor);
 
@@ -1732,6 +1725,17 @@ main(int ac, char **av)
        }
 
  authenticated:
+       /*
+        * Cancel the alarm we set to limit the time taken for
+        * authentication.
+        */
+       alarm(0);
+       signal(SIGALRM, SIG_DFL);
+       if (startup_pipe != -1) {
+               close(startup_pipe);
+               startup_pipe = -1;
+       }
+
 #ifdef SSH_AUDIT_EVENTS
        audit_event(SSH_AUTH_SUCCESS);
 #endif
This page took 0.06524 seconds and 5 git commands to generate.