summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/session.c b/session.c
index 27ca8a104..857f17b3c 100644
--- a/session.c
+++ b/session.c
@@ -2685,13 +2685,19 @@ do_cleanup(struct ssh *ssh, Authctxt *authctxt)
2685 2685
2686#ifdef KRB5 2686#ifdef KRB5
2687 if (options.kerberos_ticket_cleanup && 2687 if (options.kerberos_ticket_cleanup &&
2688 authctxt->krb5_ctx) 2688 authctxt->krb5_ctx) {
2689 temporarily_use_uid(authctxt->pw);
2689 krb5_cleanup_proc(authctxt); 2690 krb5_cleanup_proc(authctxt);
2691 restore_uid();
2692 }
2690#endif 2693#endif
2691 2694
2692#ifdef GSSAPI 2695#ifdef GSSAPI
2693 if (options.gss_cleanup_creds) 2696 if (options.gss_cleanup_creds) {
2697 temporarily_use_uid(authctxt->pw);
2694 ssh_gssapi_cleanup_creds(); 2698 ssh_gssapi_cleanup_creds();
2699 restore_uid();
2700 }
2695#endif 2701#endif
2696 2702
2697 /* remove agent socket */ 2703 /* remove agent socket */