diff options
author | Damien Miller <djm@mindrot.org> | 2005-12-24 14:59:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2005-12-24 14:59:12 +1100 |
commit | 7bff1a9b5e6a0958ebc8201542eb6d359d987a1e (patch) | |
tree | 426c3ba6f792df129aa9f54da2814000d12a2675 | |
parent | 35978210462d089a53a3e4764b8fb21e1963acba (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@
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | session.c | 11 | ||||
-rw-r--r-- | sshd.c | 20 |
3 files changed, 18 insertions, 19 deletions
@@ -43,6 +43,10 @@ - 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 @@ -3545,4 +3549,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4050 2005/12/24 03:56:47 djm Exp $ +$Id: ChangeLog,v 1.4051 2005/12/24 03:59:12 djm Exp $ @@ -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(); @@ -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 |