LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
"access_allowed: conn %d backend default %s access %s to \"%s\"\n",
conn->c_connid, access2str( access ),
- be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn ));
+ be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn.bv_val ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: backend default %s access %s to \"%s\"\n",
access2str( access ),
- be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn );
+ be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn.bv_val );
#endif
return be->be_dfltaccess >= access;
LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
"access_allowed: conn %d global default %s access %s to \"%s\"\n",
conn->c_connid, access2str( access ),
- global_default_access >= access ? "granted" : "denied", op->o_dn ));
+ global_default_access >= access ? "granted" : "denied", op->o_dn.bv_val ));
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: global default %s access %s to \"%s\"\n",
access2str( access ),
- global_default_access >= access ? "granted" : "denied", op->o_dn );
+ global_default_access >= access ? "granted" : "denied", op->o_dn.bv_val );
#endif
return global_default_access >= access;
#endif
LDAP_LOG(( "acl", LDAP_LEVEL_ARGS,
" to %s by \"%s\", (%s) \n",
val ? "value" : "all values",
- op->o_ndn ? op->o_ndn : "",
+ op->o_ndn.bv_val ? op->o_ndn.bv_val : "",
accessmask2str( *mask, accessmaskbuf ) ));
#else
Debug( LDAP_DEBUG_ACL,
if ( b->a_group_pat.bv_len && op->o_ndn.bv_len ) {
char buf[1024];
- struct berval bv = {1024, buf };
- struct berval ndn = {0, NULL };
+ struct berval bv = { sizeof(buf) - 1, buf };
+ struct berval ndn = { 0, NULL };
int rc;
/* b->a_group is an unexpanded entry name, expanded it should be an
#endif /* uncomment if uri MUST be a branch of suffix */
LDAPURLDesc *ludp;
char *last;
- struct berval dn, *pdn = NULL, *ndn = NULL;
+ struct berval dn;
int rc;
if ( argc != 2 ) {
/* name to use for meta_back_group */
} else if ( strcasecmp( argv[ 0 ], "binddn" ) == 0 ) {
int i = li->ntargets-1;
- struct berval dn, *ndn = NULL;
+ struct berval dn;
if ( i < 0 ) {
fprintf( stderr,
fname, lineno );
return 1;
}
- li->targets[ i ]->bindpw = ber_bvstrdup( argv[ 1 ] );
+ ber_str2bv( argv[ 1 ], 0L, 1, &li->targets[ i ]->bindpw );
/* name to use as pseudo-root dn */
} else if ( strcasecmp( argv[ 0 ], "pseudorootdn" ) == 0 ) {
int i = li->ntargets-1;
- struct berval dn, *ndn = NULL;
+ struct berval dn;
if ( i < 0 ) {
fprintf( stderr,
fname, lineno );
return 1;
}
- li->targets[ i ]->pseudorootpw = ber_bvstrdup( argv[ 1 ] );
+ ber_str2bv( argv[ 1 ], 0L, 1, &li->targets[ i ]->pseudorootpw );
/* dn massaging */
} else if ( strcasecmp( argv[ 0 ], "suffixmassage" ) == 0 ) {
by * read
#######################################################################
-# ldbm database definitions
+# ldap database with suffix massage definitions
#######################################################################
-include ./slapd-ldbm.conf
+include ./slapd-ldap.conf
#######################################################################
-# ldap database with suffix massage definitions
+# ldbm database definitions
#######################################################################
-include ./slapd-ldap.conf
+include ./slapd-ldbm.conf
+
if ( lt->suffix.bv_val ) {
free( lt->suffix.bv_val );
}
- if ( lt->binddn ) {
- ber_bvfree( lt->binddn );
+ if ( lt->binddn.bv_val ) {
+ free( lt->binddn.bv_val );
}
- if ( lt->bindpw ) {
- ber_bvfree( lt->bindpw );
+ if ( lt->bindpw.bv_val ) {
+ free( lt->bindpw.bv_val );
}
- if ( lt->pseudorootdn ) {
- ber_bvfree( lt->pseudorootdn );
+ if ( lt->pseudorootdn.bv_val ) {
+ free( lt->pseudorootdn.bv_val );
}
- if ( lt->pseudorootpw ) {
- ber_bvfree( lt->pseudorootpw );
+ if ( lt->pseudorootpw.bv_val ) {
+ free( lt->pseudorootpw.bv_val );
}
if ( lt->rwinfo ) {
rewrite_info_delete( lt->rwinfo );