exit( -1 );
}
- if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
+ if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
perror( "ldap_open" );
exit( -1 );
}
if ( *query == '~' || *query == '@' ) {
ld = NULL;
- } else if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
+ } else if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
fprintf(fp,
"0An error occurred (explanation)\t@%d\t%s\t%d\r\n",
LDAP_SERVER_DOWN, myhost, myport );
{
int opt;
- if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
+ if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
syslog( LOG_ALERT, "ldap_open failed" );
return( -1 );
}
if ( !use_record && strcasecmp( type, T_REPLICA_STR ) == 0 ) {
++saw_replica;
if (( p = strchr( value, ':' )) == NULL ) {
- replicaport = LDAP_PORT;
+ replicaport = 0;
} else {
*p++ = '\0';
replicaport = atoi( p );
static char *server = NULL;
static char *config_file = UD_CONFIG_FILE;
static char *filter_file = FILTERFILE;
-static int ldap_port = LDAP_PORT;
+static int ldap_port = 0;
static int dereference = TRUE;
char *default_bind_object = NULL;
*ports++ = '\0';
srv->lsrv_port = atoi( ports );
} else {
- srv->lsrv_port = LDAP_PORT;
+ srv->lsrv_port = openldap_ldap_global_options.ldo_defport;
}
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
} else {
srvlist = NULL;
for ( i = 0; dxs[ i ] != NULL; ++i ) {
- port = LDAP_PORT;
+ port = openldap_ldap_global_options.ldo_defport;
server_dn = NULL;
if ( strchr( dxs[ i ], ':' ) == NULL ) {
host = dxs[ i ];
err = -1;
} else {
if ( ludp->lud_port == 0 ) {
- srv->lsrv_port = LDAP_PORT;
+ srv->lsrv_port = openldap_ldap_global_options.ldo_defport;
} else {
srv->lsrv_port = ludp->lud_port;
}