Skip to content

Commit

Permalink
Merge 2af4b8f into b5bd00d
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-sensenich committed Sep 23, 2019
2 parents b5bd00d + 2af4b8f commit 3533a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pam_yubico.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ authorize_user_token_ldap (struct cfg *cfg,
{
retval = AUTH_NOT_FOUND;
}
if(token_id && !strncmp (token_id, vals[i]->bv_val + yubi_attr_prefix_len, strlen (vals[i]->bv_val + yubi_attr_prefix_len)))
if(token_id && !strncmp(token_id, vals[i]->bv_val + yubi_attr_prefix_len, strlen (cfg->token_id_length + yubi_attr_prefix_len)))
{
DBG ("Token found :: %s", vals[i]->bv_val);
retval = AUTH_FOUND;
Expand Down Expand Up @@ -493,7 +493,7 @@ display_error(pam_handle_t *pamh, const char *message, struct cfg *cfg) {
msg[0].msg = (char *) message; /* on some systems, pam_message.msg isn't const */
msg[0].msg_style = PAM_ERROR_MSG;
retval = conv->conv(1, pmsg, &resp, conv->appdata_ptr);

if (retval != PAM_SUCCESS) {
DBG("conv returned error: %s", pam_strerror (pamh, retval));
return retval;
Expand Down

0 comments on commit 3533a7e

Please sign in to comment.