]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2006/08/18 09:15:20
authordjm <djm>
Fri, 18 Aug 2006 14:32:46 +0000 (14:32 +0000)
committerdjm <djm>
Fri, 18 Aug 2006 14:32:46 +0000 (14:32 +0000)
     [auth.h session.c sshd.c]
     delay authentication related cleanups until we're authenticated and
     all alarms have been cancelled; ok deraadt

ChangeLog
auth.h
session.c
sshd.c

index a0dc72852a4c36b02c16371466dff151695e6e45..3f2b6602cae537710ac8b4588bd05a9009987281 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [log.c log.h sshd.c]
      make signal handler termination path shorter; risky code pointed out by
      mark dowd; ok djm markus
+   - markus@cvs.openbsd.org 2006/08/18 09:15:20
+     [auth.h session.c sshd.c]
+     delay authentication related cleanups until we're authenticated and
+     all alarms have been cancelled; ok deraadt
 
 20060817
  - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c]
diff --git a/auth.h b/auth.h
index 26158b9dd1a3cafdca1c7bc67fccefe63cc98e54..8c554b6a6902a31f4a9a5547adf38befa9cebac2 100644 (file)
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.h,v 1.57 2006/08/03 03:34:41 deraadt Exp $ */
+/* $OpenBSD: auth.h,v 1.58 2006/08/18 09:15:20 markus Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -48,6 +48,7 @@ typedef struct KbdintDevice KbdintDevice;
 
 struct Authctxt {
        sig_atomic_t     success;
+       int              authenticated; /* authenticated and alarms cancelled */
        int              postponed;     /* authentication needs another step */
        int              valid;         /* user exists and is allowed to login */
        int              attempt;
index 1eb66f44061e89660df1374375dd7a2a44e1dcaa..057298c868cd726374f8325a899bfaf2cfd22363 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.217 2006/08/04 20:46:05 stevesk Exp $ */
+/* $OpenBSD: session.c,v 1.218 2006/08/18 09:15:20 markus Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -2476,7 +2476,7 @@ do_cleanup(Authctxt *authctxt)
                return;
        called = 1;
 
-       if (authctxt == NULL)
+       if (authctxt == NULL || !authctxt->authenticated)
                return;
 #ifdef KRB5
        if (options.kerberos_ticket_cleanup &&
diff --git a/sshd.c b/sshd.c
index f1f2e38b336dea25b5adfaa4459cfd82eb6c2930..dcc626589193167dae4cda139a53abed745cf044 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.346 2006/08/18 09:13:26 deraadt Exp $ */
+/* $OpenBSD: sshd.c,v 1.347 2006/08/18 09:15:20 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1800,6 +1800,7 @@ main(int ac, char **av)
         */
        alarm(0);
        signal(SIGALRM, SIG_DFL);
+       authctxt->authenticated = 1;
        if (startup_pipe != -1) {
                close(startup_pipe);
                startup_pipe = -1;
This page took 0.11667 seconds and 5 git commands to generate.