summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-12-24 14:59:12 +1100
committerDamien Miller <djm@mindrot.org>2005-12-24 14:59:12 +1100
commit7bff1a9b5e6a0958ebc8201542eb6d359d987a1e (patch)
tree426c3ba6f792df129aa9f54da2814000d12a2675 /sshd.c
parent35978210462d089a53a3e4764b8fb21e1963acba (diff)
- 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@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sshd.c b/sshd.c
index f0fdf5a83..def90d827 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.317 2005/10/30 08:52:18 djm Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.318 2005/12/24 02:27:41 djm Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -637,13 +637,6 @@ privsep_postauth(Authctxt *authctxt)
637 goto skip; 637 goto skip;
638 } 638 }
639 639
640 /* Authentication complete */
641 alarm(0);
642 if (startup_pipe != -1) {
643 close(startup_pipe);
644 startup_pipe = -1;
645 }
646
647 /* New socket pair */ 640 /* New socket pair */
648 monitor_reinit(pmonitor); 641 monitor_reinit(pmonitor);
649 642
@@ -1732,6 +1725,17 @@ main(int ac, char **av)
1732 } 1725 }
1733 1726
1734 authenticated: 1727 authenticated:
1728 /*
1729 * Cancel the alarm we set to limit the time taken for
1730 * authentication.
1731 */
1732 alarm(0);
1733 signal(SIGALRM, SIG_DFL);
1734 if (startup_pipe != -1) {
1735 close(startup_pipe);
1736 startup_pipe = -1;
1737 }
1738
1735#ifdef SSH_AUDIT_EVENTS 1739#ifdef SSH_AUDIT_EVENTS
1736 audit_event(SSH_AUTH_SUCCESS); 1740 audit_event(SSH_AUTH_SUCCESS);
1737#endif 1741#endif