diff options
author | Idan Freiberg <speidy@gmail.com> | 2014-09-20 09:44:54 -0400 |
---|---|---|
committer | Idan Freiberg <speidy@gmail.com> | 2014-09-20 09:44:54 -0400 |
commit | 2e0d58fbfe175ff5cb92e2af1d33694b24bc29bc (patch) | |
tree | f72d64f518bd936bfe802b8ba0a90b40b9f902db | |
parent | 316445c15ddc39cb615343455514944e4bef18dd (diff) | |
parent | b6eb6d96961495ce69791e178d7456299abd1e5c (diff) | |
download | xrdp-proprietary-2e0d58fbfe175ff5cb92e2af1d33694b24bc29bc.tar.gz xrdp-proprietary-2e0d58fbfe175ff5cb92e2af1d33694b24bc29bc.zip |
Merge pull request #172 from moobyfr/fix-pam-leak
If auth fails, call pam_end so PAM backends can call _cleanup
-rw-r--r-- | sesman/verify_user_pam.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c index 4d73f85d..eec12c66 100644 --- a/sesman/verify_user_pam.c +++ b/sesman/verify_user_pam.c @@ -122,6 +122,7 @@ auth_userpass(char *user, char *pass, int *errorcode) *errorcode = error ; } g_printf("pam_start failed: %s\r\n", pam_strerror(auth_info->ph, error)); + pam_end(auth_info->ph, error); g_free(auth_info); return 0; } @@ -135,6 +136,7 @@ auth_userpass(char *user, char *pass, int *errorcode) } g_printf("pam_authenticate failed: %s\r\n", pam_strerror(auth_info->ph, error)); + pam_end(auth_info->ph, error); g_free(auth_info); return 0; } @@ -153,6 +155,7 @@ auth_userpass(char *user, char *pass, int *errorcode) } g_printf("pam_acct_mgmt failed: %s\r\n", pam_strerror(auth_info->ph, error)); + pam_end(auth_info->ph, error); g_free(auth_info); return 0; } |