summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth.h3
-rw-r--r--session.c4
-rw-r--r--sshd.c3
4 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a04d1a0f..8fdabe467 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,10 @@
26 [log.c log.h sshd.c] 26 [log.c log.h sshd.c]
27 make signal handler termination path shorter; risky code pointed out by 27 make signal handler termination path shorter; risky code pointed out by
28 mark dowd; ok djm markus 28 mark dowd; ok djm markus
29 - markus@cvs.openbsd.org 2006/08/18 09:15:20
30 [auth.h session.c sshd.c]
31 delay authentication related cleanups until we're authenticated and
32 all alarms have been cancelled; ok deraadt
29 33
3020060817 3420060817
31 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c] 35 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c]
@@ -5247,4 +5251,4 @@
5247 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 5251 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
5248 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 5252 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
5249 5253
5250$Id: ChangeLog,v 1.4491 2006/08/18 14:32:20 djm Exp $ 5254$Id: ChangeLog,v 1.4492 2006/08/18 14:32:46 djm Exp $
diff --git a/auth.h b/auth.h
index 26158b9dd..8c554b6a6 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.57 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: auth.h,v 1.58 2006/08/18 09:15:20 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -48,6 +48,7 @@ typedef struct KbdintDevice KbdintDevice;
48 48
49struct Authctxt { 49struct Authctxt {
50 sig_atomic_t success; 50 sig_atomic_t success;
51 int authenticated; /* authenticated and alarms cancelled */
51 int postponed; /* authentication needs another step */ 52 int postponed; /* authentication needs another step */
52 int valid; /* user exists and is allowed to login */ 53 int valid; /* user exists and is allowed to login */
53 int attempt; 54 int attempt;
diff --git a/session.c b/session.c
index 1eb66f440..057298c86 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.217 2006/08/04 20:46:05 stevesk Exp $ */ 1/* $OpenBSD: session.c,v 1.218 2006/08/18 09:15:20 markus Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -2476,7 +2476,7 @@ do_cleanup(Authctxt *authctxt)
2476 return; 2476 return;
2477 called = 1; 2477 called = 1;
2478 2478
2479 if (authctxt == NULL) 2479 if (authctxt == NULL || !authctxt->authenticated)
2480 return; 2480 return;
2481#ifdef KRB5 2481#ifdef KRB5
2482 if (options.kerberos_ticket_cleanup && 2482 if (options.kerberos_ticket_cleanup &&
diff --git a/sshd.c b/sshd.c
index f1f2e38b3..dcc626589 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.346 2006/08/18 09:13:26 deraadt Exp $ */ 1/* $OpenBSD: sshd.c,v 1.347 2006/08/18 09:15:20 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1800,6 +1800,7 @@ main(int ac, char **av)
1800 */ 1800 */
1801 alarm(0); 1801 alarm(0);
1802 signal(SIGALRM, SIG_DFL); 1802 signal(SIGALRM, SIG_DFL);
1803 authctxt->authenticated = 1;
1803 if (startup_pipe != -1) { 1804 if (startup_pipe != -1) {
1804 close(startup_pipe); 1805 close(startup_pipe);
1805 startup_pipe = -1; 1806 startup_pipe = -1;