mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-07 18:54:20 +01:00
Restore challenge-response functionality.
HAVE_LIBYKPERS_1 did not seem to ever get defined, so use HAVE_CR instead.
This commit is contained in:
parent
a9892dbb44
commit
b92902fd8f
10
pam_yubico.c
10
pam_yubico.c
@ -401,7 +401,7 @@ authorize_user_token_ldap (struct cfg *cfg,
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LIBYKPERS_1
|
#if HAVE_CR
|
||||||
static int
|
static int
|
||||||
display_error(pam_handle_t *pamh, char *message) {
|
display_error(pam_handle_t *pamh, char *message) {
|
||||||
struct pam_conv *conv;
|
struct pam_conv *conv;
|
||||||
@ -429,9 +429,9 @@ display_error(pam_handle_t *pamh, char *message) {
|
|||||||
D(("conv returned: '%s'", resp->resp));
|
D(("conv returned: '%s'", resp->resp));
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* HAVE_CR */
|
||||||
|
|
||||||
#if HAVE_LIBYKPERS_1
|
#if HAVE_CR
|
||||||
static int
|
static int
|
||||||
do_challenge_response(pam_handle_t *pamh, struct cfg *cfg, const char *username)
|
do_challenge_response(pam_handle_t *pamh, struct cfg *cfg, const char *username)
|
||||||
{
|
{
|
||||||
@ -605,7 +605,7 @@ do_challenge_response(pam_handle_t *pamh, struct cfg *cfg, const char *username)
|
|||||||
free(tmpfile);
|
free(tmpfile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* HAVE_CR */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
||||||
@ -717,7 +717,7 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|||||||
DBG (("get user returned: %s", user));
|
DBG (("get user returned: %s", user));
|
||||||
|
|
||||||
if (cfg->mode == CHRESP) {
|
if (cfg->mode == CHRESP) {
|
||||||
#if HAVE_LIBYKPERS_1
|
#if HAVE_CR
|
||||||
return do_challenge_response(pamh, cfg, user);
|
return do_challenge_response(pamh, cfg, user);
|
||||||
#else
|
#else
|
||||||
DBG (("no support for challenge/response"));
|
DBG (("no support for challenge/response"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user