summaryrefslogtreecommitdiff
path: root/auth-krb5.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-10-02 16:12:36 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-10-02 16:12:36 +1000
commit3e33cecf71860f73656a73b754cc7b7b9ec0b0ce (patch)
tree4c993022225dc70faeb42e23ff3323fd1deb717a /auth-krb5.c
parentb210aa2cfa546d8c31f8c725d1de3050c747bd6e (diff)
downloadopenssh-git-3e33cecf71860f73656a73b754cc7b7b9ec0b0ce.tar.gz
- 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.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/auth-krb5.c b/auth-krb5.c
index 0aa5195b..e31f2eb0 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -28,7 +28,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-krb5.c,v 1.12 2003/08/28 12:54:34 markus Exp $");
+RCSID("$OpenBSD: auth-krb5.c,v 1.13 2003/09/23 20:17:11 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -50,7 +50,6 @@ krb5_init(void *context)
{
Authctxt *authctxt = (Authctxt *)context;
krb5_error_code problem;
- static int cleanup_registered = 0;
if (authctxt->krb5_ctx == NULL) {
problem = krb5_init_context(&authctxt->krb5_ctx);
@@ -58,10 +57,6 @@ krb5_init(void *context)
return (problem);
krb5_init_ets(authctxt->krb5_ctx);
}
- if (!cleanup_registered) {
- fatal_add_cleanup(krb5_cleanup_proc, authctxt);
- cleanup_registered = 1;
- }
return (0);
}
@@ -205,10 +200,8 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
}
void
-krb5_cleanup_proc(void *context)
+krb5_cleanup_proc(Authctxt *authctxt)
{
- Authctxt *authctxt = (Authctxt *)context;
-
debug("krb5_cleanup_proc called");
if (authctxt->krb5_fwd_ccache) {
krb5_cc_destroy(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);