mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 09:24:22 +01:00
consider all success as valid session
This commit is contained in:
parent
f6e1ec9483
commit
0d3a4f4f75
17
pam_yubico.c
17
pam_yubico.c
@ -1089,7 +1089,6 @@ done:
|
|||||||
}
|
}
|
||||||
DBG (("done. [%s]", pam_strerror (pamh, retval)));
|
DBG (("done. [%s]", pam_strerror (pamh, retval)));
|
||||||
pam_set_data (pamh, "yubico_setcred_return", (void*)(intptr_t)retval, NULL);
|
pam_set_data (pamh, "yubico_setcred_return", (void*)(intptr_t)retval, NULL);
|
||||||
pam_set_data (pamh, "yubico_used_ldap", (void*)(intptr_t)cfg->ldap_bind_no_anonymous, NULL);
|
|
||||||
|
|
||||||
if (resp)
|
if (resp)
|
||||||
{
|
{
|
||||||
@ -1110,17 +1109,13 @@ pam_sm_setcred (pam_handle_t * pamh, int flags, int argc, const char **argv)
|
|||||||
PAM_EXTERN int
|
PAM_EXTERN int
|
||||||
pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
int use_ldap = -1;
|
int retval;
|
||||||
int rc = pam_get_data(pamh, "yubico_used_ldap", (const void**)&use_ldap);
|
int rc = pam_get_data(pamh, "yubico_setcred_return", (const void**)&retval);
|
||||||
if (rc == PAM_SUCCESS && use_ldap) {
|
if (rc == PAM_SUCCESS && retval == PAM_SUCCESS) {
|
||||||
int retval;
|
D (("pam_sm_acct_mgmt returing PAM_SUCCESS"));
|
||||||
rc = pam_get_data(pamh, "yubico_setcred_return", (const void**)&retval);
|
return PAM_SUCCESS;
|
||||||
if (rc == PAM_SUCCESS && retval == PAM_SUCCESS) {
|
|
||||||
D (("pam_sm_acct_mgmt returing PAM_SUCCESS"));
|
|
||||||
return PAM_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
D (("pam_sm_acct_mgmt returing PAM_AUTH_ERR:%d", use_ldap));
|
D (("pam_sm_acct_mgmt returing PAM_AUTH_ERR:%d", rc));
|
||||||
return PAM_AUTH_ERR;
|
return PAM_AUTH_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user