mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
minor cleanup
This commit is contained in:
parent
80c2bb5003
commit
fefa59059d
@ -70,7 +70,7 @@ ldap_back_bind( Operation *op, SlapReply *rs )
|
||||
rc = ldap_back_op_result( lc, op, rs, msgid, 1 );
|
||||
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
#ifdef LDAP_BACK_PROXY_AUTHZ
|
||||
#if defined(LDAP_BACK_PROXY_AUTHZ)
|
||||
if ( li->idassert_flags & LDAP_BACK_AUTH_OVERRIDE ) {
|
||||
ldap_back_proxy_authz_bind( lc, op, rs );
|
||||
if ( lc->lc_bound == 0 ) {
|
||||
|
@ -74,6 +74,7 @@ ldap_back_db_config(
|
||||
if ( li->url != NULL ) {
|
||||
ch_free( li->url );
|
||||
}
|
||||
|
||||
l = strlen( argv[1] ) + STRLENOF( "ldap:///") + 1;
|
||||
li->url = ch_calloc( l, sizeof( char ) );
|
||||
if ( li->url == NULL ) {
|
||||
|
@ -121,7 +121,8 @@ ldap_back_db_open( BackendDB *be )
|
||||
struct ldapinfo *li = (struct ldapinfo *)be->be_private;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"ldap_back_db_open: URI=%s\n", li->url, 0, 0 );
|
||||
"ldap_back_db_open: URI=%s\n",
|
||||
li->url != NULL ? li->url : "", 0, 0 );
|
||||
|
||||
#ifdef LDAP_BACK_PROXY_AUTHZ
|
||||
/* by default, use proxyAuthz control on each operation */
|
||||
@ -200,7 +201,7 @@ ldap_back_db_destroy(
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &li->conn_mutex );
|
||||
|
||||
if ( li->url ) {
|
||||
if ( li->url != NULL ) {
|
||||
ch_free( li->url );
|
||||
li->url = NULL;
|
||||
}
|
||||
|
@ -344,12 +344,14 @@ monitor_subsys_database_init(
|
||||
|
||||
#if defined(SLAPD_LDAP)
|
||||
if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
|
||||
struct ldapinfo *li = (struct ldapinfo *)be->be_private;
|
||||
struct ldapinfo *li =
|
||||
(struct ldapinfo *)be->be_private;
|
||||
struct berval bv;
|
||||
|
||||
bv.bv_val = li->url;
|
||||
bv.bv_len = strlen( bv.bv_val );
|
||||
attr_merge_normalize_one( e, slap_schema.si_ad_labeledURI,
|
||||
ber_str2bv( li->url, 0, 0, &bv );
|
||||
|
||||
attr_merge_normalize_one( e,
|
||||
slap_schema.si_ad_labeledURI,
|
||||
&bv, NULL );
|
||||
}
|
||||
#endif /* defined(SLAPD_LDAP) */
|
||||
|
Loading…
Reference in New Issue
Block a user