Check for null password before using it.
This commit is contained in:
parent
3622dd745a
commit
bb67a93ec8
@ -96,6 +96,8 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,
|
|||||||
|
|
||||||
memset(&basicCredential,0,sizeof(basicCredential));
|
memset(&basicCredential,0,sizeof(basicCredential));
|
||||||
|
|
||||||
|
if (user && wkstnPasswd)
|
||||||
|
{
|
||||||
basicCredential.unFlags = 0;
|
basicCredential.unFlags = 0;
|
||||||
strcpy(basicCredential.username,user);
|
strcpy(basicCredential.username,user);
|
||||||
basicCredential.unLen = strlen(user) + 1;
|
basicCredential.unLen = strlen(user) + 1;
|
||||||
@ -110,6 +112,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,
|
|||||||
pam_sscs_log( LOG_ERR,"Setting the default credential failed.Errcode = %d\n",retVal);
|
pam_sscs_log( LOG_ERR,"Setting the default credential failed.Errcode = %d\n",retVal);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}while(0);
|
}while(0);
|
||||||
|
|
||||||
seteuid(saved_uid);
|
seteuid(saved_uid);
|
||||||
|
Loading…
Reference in New Issue
Block a user