summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix/ckp_pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/osdep/unix/ckp_pam.c')
-rw-r--r--imap/src/osdep/unix/ckp_pam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/imap/src/osdep/unix/ckp_pam.c b/imap/src/osdep/unix/ckp_pam.c
index 60c6c1f7..5bc31f3d 100644
--- a/imap/src/osdep/unix/ckp_pam.c
+++ b/imap/src/osdep/unix/ckp_pam.c
@@ -104,13 +104,13 @@ struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[])
conv.appdata_ptr = &cred;
cred.uname = name;
cred.pass = pass;
- if (pw = ((pam_start ((char *) mail_parameters (NIL,GET_SERVICENAME,NIL),
+ if ((pw = ((pam_start ((char *) mail_parameters (NIL,GET_SERVICENAME,NIL),
pw->pw_name,&conv,&hdl) == PAM_SUCCESS) &&
(pam_set_item (hdl,PAM_RHOST,tcp_clientaddr ()) == PAM_SUCCESS) &&
(pam_authenticate (hdl,NIL) == PAM_SUCCESS) &&
(pam_acct_mgmt (hdl,NIL) == PAM_SUCCESS) &&
(pam_setcred (hdl,PAM_ESTABLISH_CRED) == PAM_SUCCESS)) ?
- getpwnam (name) : NIL) {
+ getpwnam (name) : NIL) != NULL) {
#if 0
/*
* Some people have reported that this causes a SEGV in strncpy() from