summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-12-19 11:31:44 +1100
committerDarren Tucker <dtucker@zip.com.au>2013-12-19 11:31:44 +1100
commit53f8e784dc431a82d31c9b0e95b144507f9330e9 (patch)
treeb576ea4fa301ebd2f94d831ae2e15f75644e86a9 /auth-pam.c
parent1fcec9d4f265e38af248c4c845986ca8c174bd68 (diff)
- (dtucker) [auth-pam.c] bz#2163: check return value from pam_get_item().
Patch from Loganaden Velvindron.
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c
index d51318b3a..d789bad7b 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -438,8 +438,10 @@ sshpam_thread(void *ctxtp)
438 const char **ptr_pam_user = &pam_user; 438 const char **ptr_pam_user = &pam_user;
439 char *tz = getenv("TZ"); 439 char *tz = getenv("TZ");
440 440
441 pam_get_item(sshpam_handle, PAM_USER, 441 sshpam_err = pam_get_item(sshpam_handle, PAM_USER,
442 (sshpam_const void **)ptr_pam_user); 442 (sshpam_const void **)ptr_pam_user);
443 if (sshpam_err != PAM_SUCCESS)
444 goto auth_fail;
443 445
444 environ[0] = NULL; 446 environ[0] = NULL;
445 if (tz != NULL) 447 if (tz != NULL)