1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2024-11-29 00:24:11 +01:00

move protocol inside HAVE_LIBLDAP

to avoid warning of unused variable
This commit is contained in:
Klas Lindfors 2015-03-04 09:57:22 +01:00
parent 311958093d
commit 77c152df6f

View File

@ -209,8 +209,9 @@ authorize_user_token_ldap (struct cfg *cfg,
const char *token_id) const char *token_id)
{ {
int retval = 0; int retval = 0;
int protocol;
#ifdef HAVE_LIBLDAP #ifdef HAVE_LIBLDAP
/* LDAPv2 is historical -- RFC3494. */
int protocol = LDAP_VERSION3;
int yubi_attr_prefix_len = 0; int yubi_attr_prefix_len = 0;
LDAP *ld = NULL; LDAP *ld = NULL;
LDAPMessage *result = NULL, *e; LDAPMessage *result = NULL, *e;
@ -260,8 +261,6 @@ authorize_user_token_ldap (struct cfg *cfg,
} }
} }
/* LDAPv2 is historical -- RFC3494. */
protocol = LDAP_VERSION3;
ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &protocol); ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &protocol);
/* Bind anonymously to the LDAP server. */ /* Bind anonymously to the LDAP server. */