}
ldap_back_map(&li->at_map, &entry_at->ad_cname, &mapped, BACKLDAP_MAP);
- if (mapped.bv_val == NULL) {
+ if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
return 1;
}
} else {
ldap_back_map(&li->oc_map, &v[j], &mapped,
BACKLDAP_REMAP);
- if (mapped.bv_val) {
+ if (mapped.bv_val && mapped.bv_val[0] != '\0') {
ber_dupbv( &v[j], &mapped );
if (v[j].bv_val)
j++;
ldap_back_map(&li->oc_map, &group_oc_name, &group_oc_name,
BACKLDAP_MAP);
- if (group_oc_name.bv_val == NULL)
+ if (group_oc_name.bv_val == NULL || group_oc_name.bv_val[0] == '\0')
goto cleanup;
ldap_back_map(&li->at_map, &group_at_name, &group_at_name,
BACKLDAP_MAP);
- if (group_at_name.bv_val == NULL)
+ if (group_at_name.bv_val == NULL || group_at_name.bv_val[0] == '\0')
goto cleanup;
filter = ch_malloc(sizeof("(&(objectclass=)(=))")
tmp.bv_len = p - q;
tmp.bv_val = q;
ldap_back_map(at_map, &tmp, &m, remap);
- if (m.bv_val == NULL)
+ if (m.bv_val == NULL || m.bv_val[0] == '\0') {
ldap_back_map(oc_map, &tmp, &m, remap);
- if (m.bv_val == NULL) {
- m = tmp;
+ if (m.bv_val == NULL || m.bv_val[0] == '\0') {
+ m = tmp;
+ }
}
extra += p - q;
plen = m.bv_len;
for (i = j = 0; an[i].an_name.bv_val; i++) {
ldap_back_map(at_map, &an[i].an_name, &mapped, remap);
- if (mapped.bv_val != NULL)
+ if (mapped.bv_val != NULL && mapped.bv_val != '\0')
na[j++] = mapped.bv_val;
}
if (j == 0 && i != 0)
ldap_back_map(&li->at_map, &ml->sml_desc->ad_cname, &mapped,
BACKLDAP_MAP);
- if (mapped.bv_val == NULL) {
+ if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
continue;
}
ldap_back_map( &li->targets[ candidate ]->at_map,
&a->a_desc->ad_cname, &mapped, BACKLDAP_MAP );
- if ( mapped.bv_val == NULL ) {
+ if ( mapped.bv_val == NULL || mapped.bv_val[0] == '\0' ) {
continue;
}
ldap_back_map( &li->targets[ candidate ]->at_map,
&entry_at->ad_cname, &mapped, BACKLDAP_MAP );
- if ( mapped.bv_val == NULL )
+ if ( mapped.bv_val == NULL || mapped.bv_val[0] == '\0' )
return 1;
rc = ldap_initialize( &ld, li->targets[ candidate ]->uri );
}
} else {
ldap_back_map( &li->targets[ candidate ]->oc_map, &v[ j ], &mapped, BACKLDAP_REMAP );
- if ( mapped.bv_val ) {
+ if ( mapped.bv_val && mapped.bv_val[0] != '\0' ) {
ber_dupbv( &v[ j ], &mapped );
if ( v[ j ].bv_val ) {
j++;
ldap_back_map( &li->targets[ candidate ]->oc_map,
&group_oc_name, &group_oc_name, BACKLDAP_MAP );
- if ( group_oc_name.bv_val == NULL ) {
+ if ( group_oc_name.bv_val == NULL || group_oc_name.bv_val[0] == '\0' ) {
goto cleanup;
}
ldap_back_map( &li->targets[ candidate ]->at_map,
&group_at_name, &group_at_name, BACKLDAP_MAP );
- if ( group_at_name.bv_val == NULL ) {
+ if ( group_at_name.bv_val == NULL || group_at_name.bv_val[0] == '\0' ) {
goto cleanup;
}
ldap_back_map( &li->targets[ candidate ]->at_map,
&ml->sml_desc->ad_cname, &mapped,
BACKLDAP_MAP );
- if ( mapped.bv_val == NULL ) {
+ if ( mapped.bv_val == NULL || mapped.bv_val[0] == '\0' ) {
continue;
}