if (want_bindpw && passwd.bv_val == NULL ) {
/* handle bind password */
- fprintf( stderr, "Bind DN: %s\n", binddn );
passwd.bv_val = strdup( getpassphrase("Enter bind password: "));
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
}
/* LDAPv3 only */
- version = 3;
+ version = LDAP_VERSION3;
rc = ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version );
if(rc != LDAP_OPT_SUCCESS ) {
}
if (version == -1 ) {
- version = 3;
+ version = LDAP_VERSION3;
}
if( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version )
return err;
}
-void print_ctrls( LDAPControl **ctrls ) {
+static void print_ctrls(
+ LDAPControl **ctrls )
+{
int i;
for(i=0; ctrls[i] != NULL; i++ ) {
/* control: OID criticality base64value */