summaryrefslogtreecommitdiff
path: root/gss-serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-serv.c')
-rw-r--r--gss-serv.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gss-serv.c b/gss-serv.c
index 8fd1d63f0..de32a3f2e 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.5 2003/11/17 11:06:07 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}
@@ -289,4 +287,14 @@ ssh_gssapi_userok(char *user)
289 return (0); 287 return (0);
290} 288}
291 289
290/* Priviledged */
291OM_uint32
292ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
293{
294 ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
295 gssbuf, gssmic, NULL);
296
297 return (ctx->major);
298}
299
292#endif 300#endif