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:
parent
311958093d
commit
77c152df6f
@ -209,8 +209,9 @@ authorize_user_token_ldap (struct cfg *cfg,
|
||||
const char *token_id)
|
||||
{
|
||||
int retval = 0;
|
||||
int protocol;
|
||||
#ifdef HAVE_LIBLDAP
|
||||
/* LDAPv2 is historical -- RFC3494. */
|
||||
int protocol = LDAP_VERSION3;
|
||||
int yubi_attr_prefix_len = 0;
|
||||
LDAP *ld = NULL;
|
||||
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);
|
||||
|
||||
/* Bind anonymously to the LDAP server. */
|
||||
|
Loading…
Reference in New Issue
Block a user