summaryrefslogtreecommitdiff
path: root/gss-serv.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 /gss-serv.c
parentb210aa2cfa546d8c31f8c725d1de3050c747bd6e (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 'gss-serv.c')
-rw-r--r--gss-serv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gss-serv.c b/gss-serv.c
index 8fd1d63f0..6574f9750 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-serv.c,v 1.3 2003/08/31 13:31:57 markus Exp $ */ 1/* $OpenBSD: gss-serv.c,v 1.4 2003/09/23 20:17:11 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -232,9 +232,9 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
232 return (ctx->major); 232 return (ctx->major);
233} 233}
234 234
235/* As user - called through fatal cleanup hook */ 235/* As user - called on fatal/exit */
236void 236void
237ssh_gssapi_cleanup_creds(void *ignored) 237ssh_gssapi_cleanup_creds(void)
238{ 238{
239 if (gssapi_client.store.filename != NULL) { 239 if (gssapi_client.store.filename != NULL) {
240 /* Unlink probably isn't sufficient */ 240 /* Unlink probably isn't sufficient */
@@ -249,8 +249,6 @@ ssh_gssapi_storecreds(void)
249{ 249{
250 if (gssapi_client.mech && gssapi_client.mech->storecreds) { 250 if (gssapi_client.mech && gssapi_client.mech->storecreds) {
251 (*gssapi_client.mech->storecreds)(&gssapi_client); 251 (*gssapi_client.mech->storecreds)(&gssapi_client);
252 if (options.gss_cleanup_creds)
253 fatal_add_cleanup(ssh_gssapi_cleanup_creds, NULL);
254 } else 252 } else
255 debug("ssh_gssapi_storecreds: Not a GSSAPI mechanism"); 253 debug("ssh_gssapi_storecreds: Not a GSSAPI mechanism");
256} 254}