minor cleanup

This commit is contained in:
Pierangelo Masarati 2004-12-08 19:11:27 +00:00
parent 80c2bb5003
commit fefa59059d
4 changed files with 11 additions and 7 deletions

View File

@ -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 ) {

View File

@ -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 ) {

View File

@ -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;
}

View File

@ -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) */