mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Port ldap.conf patch from -devel.
This commit is contained in:
parent
463f4f97b5
commit
cddb59b209
4 changed files with 32 additions and 19 deletions
4
configure
vendored
4
configure
vendored
|
|
@ -77,7 +77,7 @@ ac_help="$ac_help
|
|||
--enable-static=PKGS only build shared libraries if the current package
|
||||
appears as an element in the PKGS list"
|
||||
ac_help="$ac_help
|
||||
--enable-shared build shared libraries [default=yes]
|
||||
--enable-shared build shared libraries [default=no]
|
||||
--enable-shared=PKGS only build shared libraries if the current package
|
||||
appears as an element in the PKGS list"
|
||||
ac_help="$ac_help
|
||||
|
|
@ -1434,7 +1434,7 @@ no) enable_shared=no ;;
|
|||
;;
|
||||
esac
|
||||
else
|
||||
enable_shared=yes
|
||||
enable_shared=no
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ OL_ARG_ENABLE(slurpd,[ --enable-slurpd enable building slurpd], auto)dnl
|
|||
|
||||
AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
|
||||
AM_ENABLE_STATIC
|
||||
dnl AM_DISABLE_SHARED
|
||||
AM_ENABLE_SHARED
|
||||
AM_DISABLE_SHARED
|
||||
dnl AM_ENABLE_SHARED
|
||||
|
||||
dnl General "enable" options
|
||||
# validate options
|
||||
|
|
|
|||
|
|
@ -148,8 +148,28 @@ ldap_init( char *defhost, int defport )
|
|||
return( NULL );
|
||||
}
|
||||
|
||||
/* copy the global options */
|
||||
ld->ld_defport = openldap_ldap_global_options.ldo_defport;
|
||||
ld->ld_deref = openldap_ldap_global_options.ldo_deref;
|
||||
ld->ld_sizelimit = openldap_ldap_global_options.ldo_sizelimit;
|
||||
ld->ld_timelimit = openldap_ldap_global_options.ldo_timelimit;
|
||||
|
||||
if ( defhost != NULL ) {
|
||||
ld->ld_defhost = ldap_strdup( defhost );
|
||||
} else {
|
||||
ld->ld_defhost = ldap_strdup(
|
||||
openldap_ldap_global_options.ldo_defhost);
|
||||
}
|
||||
|
||||
if( ld->ld_defhost == NULL ) {
|
||||
free( (char*)ld );
|
||||
WSACleanup( );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
#ifdef LDAP_REFERRALS
|
||||
if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) {
|
||||
free( (char*) ld->ld_defhost );
|
||||
free( (char*)ld );
|
||||
WSACleanup( );
|
||||
return( NULL );
|
||||
|
|
@ -157,27 +177,14 @@ ldap_init( char *defhost, int defport )
|
|||
ld->ld_options = LDAP_OPT_REFERRALS;
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
||||
if ( defhost != NULL &&
|
||||
( ld->ld_defhost = ldap_strdup( defhost )) == NULL ) {
|
||||
#ifdef LDAP_REFERRALS
|
||||
ldap_free_select_info( ld->ld_selectinfo );
|
||||
#endif /* LDAP_REFERRALS */
|
||||
free( (char*)ld );
|
||||
WSACleanup( );
|
||||
return( NULL );
|
||||
if(defport != 0) {
|
||||
ld->ld_defport = defport;
|
||||
}
|
||||
|
||||
|
||||
ld->ld_defport = ( defport == 0 ) ?
|
||||
openldap_ldap_global_options.ldo_defport : defport;
|
||||
ld->ld_version = LDAP_VERSION;
|
||||
ld->ld_lberoptions = LBER_USE_DER;
|
||||
ld->ld_refhoplimit = LDAP_DEFAULT_REFHOPLIMIT;
|
||||
|
||||
#ifdef LDAP_REFERRALS
|
||||
ld->ld_options |= LDAP_OPT_REFERRALS;
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
||||
#if defined( STR_TRANSLATION ) && defined( LDAP_DEFAULT_CHARSET )
|
||||
ld->ld_lberoptions |= LBER_TRANSLATE_STRINGS;
|
||||
#if LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET
|
||||
|
|
|
|||
|
|
@ -114,6 +114,12 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter,
|
|||
}
|
||||
|
||||
if ( base == NULL ) {
|
||||
/* no base provided, use global default base */
|
||||
base = openldap_ldap_global_options.ldo_defbase;
|
||||
}
|
||||
|
||||
if ( base == NULL ) {
|
||||
/* no session default base, use top */
|
||||
base = "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue