diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-10-02 16:12:36 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-10-02 16:12:36 +1000 |
commit | 3e33cecf71860f73656a73b754cc7b7b9ec0b0ce (patch) | |
tree | 4c993022225dc70faeb42e23ff3323fd1deb717a /auth-krb5.c | |
parent | b210aa2cfa546d8c31f8c725d1de3050c747bd6e (diff) |
- markus@cvs.openbsd.org 2003/09/23 20:17:11
[Makefile.in auth1.c auth2.c auth.c auth.h auth-krb5.c canohost.c
cleanup.c clientloop.c fatal.c gss-serv.c log.c log.h monitor.c monitor.h
monitor_wrap.c monitor_wrap.h packet.c serverloop.c session.c session.h
ssh-agent.c sshd.c]
replace fatal_cleanup() and linked list of fatal callbacks with static
cleanup_exit() function. re-refine cleanup_exit() where appropriate,
allocate sshd's authctxt eary to allow simpler cleanup in sshd.
tested by many, ok deraadt@
Diffstat (limited to 'auth-krb5.c')
-rw-r--r-- | auth-krb5.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/auth-krb5.c b/auth-krb5.c index 0aa5195b8..e31f2eb0e 100644 --- a/auth-krb5.c +++ b/auth-krb5.c | |||
@@ -28,7 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "includes.h" | 30 | #include "includes.h" |
31 | RCSID("$OpenBSD: auth-krb5.c,v 1.12 2003/08/28 12:54:34 markus Exp $"); | 31 | RCSID("$OpenBSD: auth-krb5.c,v 1.13 2003/09/23 20:17:11 markus Exp $"); |
32 | 32 | ||
33 | #include "ssh.h" | 33 | #include "ssh.h" |
34 | #include "ssh1.h" | 34 | #include "ssh1.h" |
@@ -50,7 +50,6 @@ krb5_init(void *context) | |||
50 | { | 50 | { |
51 | Authctxt *authctxt = (Authctxt *)context; | 51 | Authctxt *authctxt = (Authctxt *)context; |
52 | krb5_error_code problem; | 52 | krb5_error_code problem; |
53 | static int cleanup_registered = 0; | ||
54 | 53 | ||
55 | if (authctxt->krb5_ctx == NULL) { | 54 | if (authctxt->krb5_ctx == NULL) { |
56 | problem = krb5_init_context(&authctxt->krb5_ctx); | 55 | problem = krb5_init_context(&authctxt->krb5_ctx); |
@@ -58,10 +57,6 @@ krb5_init(void *context) | |||
58 | return (problem); | 57 | return (problem); |
59 | krb5_init_ets(authctxt->krb5_ctx); | 58 | krb5_init_ets(authctxt->krb5_ctx); |
60 | } | 59 | } |
61 | if (!cleanup_registered) { | ||
62 | fatal_add_cleanup(krb5_cleanup_proc, authctxt); | ||
63 | cleanup_registered = 1; | ||
64 | } | ||
65 | return (0); | 60 | return (0); |
66 | } | 61 | } |
67 | 62 | ||
@@ -205,10 +200,8 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
205 | } | 200 | } |
206 | 201 | ||
207 | void | 202 | void |
208 | krb5_cleanup_proc(void *context) | 203 | krb5_cleanup_proc(Authctxt *authctxt) |
209 | { | 204 | { |
210 | Authctxt *authctxt = (Authctxt *)context; | ||
211 | |||
212 | debug("krb5_cleanup_proc called"); | 205 | debug("krb5_cleanup_proc called"); |
213 | if (authctxt->krb5_fwd_ccache) { | 206 | if (authctxt->krb5_fwd_ccache) { |
214 | krb5_cc_destroy(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); | 207 | krb5_cc_destroy(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); |