diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-08-16 23:28:04 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-08-16 23:28:04 +1000 |
commit | 9142e1c66d64bcca850b51cc445fe37920266c48 (patch) | |
tree | 9cd8ed9d8e7febfed6d5df3fe6e4866499b61465 | |
parent | fc5d188b34eb34a5c26c7430e563403bb36df5fb (diff) |
- (dtucker) [session.c] Call PAM cleanup functions for unauthenticated
connections too. Based on a patch from Sandro Wefel, with & ok djm@
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | session.c | 20 |
2 files changed, 17 insertions, 9 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20070816 | ||
2 | - (dtucker) [session.c] Call PAM cleanup functions for unauthenticated | ||
3 | connections too. Based on a patch from Sandro Wefel, with & ok djm@ | ||
4 | |||
1 | 20070815 | 5 | 20070815 |
2 | - (dtucker) OpenBSD CVS Sync | 6 | - (dtucker) OpenBSD CVS Sync |
3 | - markus@cvs.openbsd.org 2007/08/15 08:14:46 | 7 | - markus@cvs.openbsd.org 2007/08/15 08:14:46 |
@@ -3169,4 +3173,4 @@ | |||
3169 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3173 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3170 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3174 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3171 | 3175 | ||
3172 | $Id: ChangeLog,v 1.4730 2007/08/15 12:20:22 dtucker Exp $ | 3176 | $Id: ChangeLog,v 1.4731 2007/08/16 13:28:04 dtucker Exp $ |
@@ -2478,8 +2478,19 @@ do_cleanup(Authctxt *authctxt) | |||
2478 | return; | 2478 | return; |
2479 | called = 1; | 2479 | called = 1; |
2480 | 2480 | ||
2481 | if (authctxt == NULL || !authctxt->authenticated) | 2481 | if (authctxt == NULL) |
2482 | return; | 2482 | return; |
2483 | |||
2484 | #ifdef USE_PAM | ||
2485 | if (options.use_pam) { | ||
2486 | sshpam_cleanup(); | ||
2487 | sshpam_thread_cleanup(); | ||
2488 | } | ||
2489 | #endif | ||
2490 | |||
2491 | if (!authctxt->authenticated) | ||
2492 | return; | ||
2493 | |||
2483 | #ifdef KRB5 | 2494 | #ifdef KRB5 |
2484 | if (options.kerberos_ticket_cleanup && | 2495 | if (options.kerberos_ticket_cleanup && |
2485 | authctxt->krb5_ctx) | 2496 | authctxt->krb5_ctx) |
@@ -2491,13 +2502,6 @@ do_cleanup(Authctxt *authctxt) | |||
2491 | ssh_gssapi_cleanup_creds(); | 2502 | ssh_gssapi_cleanup_creds(); |
2492 | #endif | 2503 | #endif |
2493 | 2504 | ||
2494 | #ifdef USE_PAM | ||
2495 | if (options.use_pam) { | ||
2496 | sshpam_cleanup(); | ||
2497 | sshpam_thread_cleanup(); | ||
2498 | } | ||
2499 | #endif | ||
2500 | |||
2501 | /* remove agent socket */ | 2505 | /* remove agent socket */ |
2502 | auth_sock_cleanup_proc(authctxt->pw); | 2506 | auth_sock_cleanup_proc(authctxt->pw); |
2503 | 2507 | ||