Commit 216bcd94 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

more SLAP_NVALUES cleanup

parent 315f7bce
......@@ -171,7 +171,7 @@ attr_merge_one(
AttributeDescription *desc,
struct berval *val
#ifdef SLAP_NVALUES
, BerVarray nval
, struct berval *nval
#endif
) {
int rc;
......
......@@ -98,7 +98,7 @@ passwd_back_search(
}
vals[0] = rdn[0][0]->la_value;
attr_merge( e, desc, vals );
attr_mergeit( e, desc, vals );
ldap_rdnfree(rdn);
rdn = NULL;
......@@ -112,7 +112,7 @@ passwd_back_search(
*/
vals[0].bv_val = "organizationalUnit";
vals[0].bv_len = sizeof("organizationalUnit")-1;
attr_merge( e, ad_objectClass, vals );
attr_mergeit( e, ad_objectClass, vals );
if ( test_filter( be, conn, op, e, filter ) == LDAP_COMPARE_TRUE ) {
send_search_entry( be, conn, op,
......@@ -306,21 +306,21 @@ pw2entry( Backend *be, struct passwd *pw, const char **text )
/* objectclasses should be configurable items */
vals[0].bv_val = "top";
vals[0].bv_len = sizeof("top")-1;
attr_merge( e, ad_objectClass, vals );
attr_mergeit( e, ad_objectClass, vals );
vals[0].bv_val = "person";
vals[0].bv_len = sizeof("person")-1;
attr_merge( e, ad_objectClass, vals );
attr_mergeit( e, ad_objectClass, vals );
vals[0].bv_val = "uidObject";
vals[0].bv_len = sizeof("uidObject")-1;
attr_merge( e, ad_objectClass, vals );
attr_mergeit( e, ad_objectClass, vals );
vals[0].bv_val = pw->pw_name;
vals[0].bv_len = pwlen;
attr_merge( e, ad_uid, vals ); /* required by uidObject */
attr_merge( e, ad_cn, vals ); /* required by person */
attr_merge( e, ad_sn, vals ); /* required by person */
attr_mergeit( e, ad_uid, vals ); /* required by uidObject */
attr_mergeit( e, ad_cn, vals ); /* required by person */
attr_mergeit( e, ad_sn, vals ); /* required by person */
#ifdef HAVE_PW_GECOS
/*
......@@ -333,7 +333,7 @@ pw2entry( Backend *be, struct passwd *pw, const char **text )
vals[0].bv_val = pw->pw_gecos;
vals[0].bv_len = strlen(vals[0].bv_val);
attr_merge(e, ad_description, vals);
attr_mergeit(e, ad_description, vals);
s = strchr(vals[0].bv_val, ',');
if (s) *s = '\0';
......@@ -355,13 +355,13 @@ pw2entry( Backend *be, struct passwd *pw, const char **text )
vals[0].bv_len = strlen(vals[0].bv_val);
if ( vals[0].bv_len && strcasecmp( vals[0].bv_val, pw->pw_name )) {
attr_merge( e, ad_cn, vals );
attr_mergeit( e, ad_cn, vals );
}
if ( (s=strrchr(vals[0].bv_val, ' '))) {
vals[0].bv_val = s + 1;
vals[0].bv_len = strlen(vals[0].bv_val);
attr_merge(e, ad_sn, vals);
attr_mergeit(e, ad_sn, vals);
}
}
#endif
......
......@@ -118,6 +118,7 @@ schema_info( Entry **entry, const char **text )
#ifdef SLAP_NVALUES
nvals[0].bv_val = strchr( global_schemandn.bv_val, '=' );
assert( nvals[0].bv_val );
nvals[0].bv_val++;
nvals[0].bv_len = global_schemandn.bv_len -
(nvals[0].bv_val - global_schemandn.bv_val);
......
......@@ -257,7 +257,7 @@ slapi_entry_attr_merge(
return -1;
}
rc = attr_merge( e, ad, bv );
rc = attr_mergeit( e, ad, bv );
ch_free( bv );
return rc;
......@@ -469,7 +469,7 @@ slapi_entry_attr_set_charptr(Slapi_Entry* e, const char *type, const char *value
if ( value != NULL ) {
bv.bv_val = (char *)value;
bv.bv_len = strlen(value);
attr_merge_one ( e, ad, &bv );
attr_mergeit_one( e, ad, &bv );
}
#endif /* LDAP_SLAPI */
}
......@@ -599,7 +599,7 @@ slapi_entry_add_valueset(Slapi_Entry *e, const char *type, Slapi_ValueSet *vs)
return -1;
}
return attr_merge( e, ad, *vs );
return attr_mergeit( e, ad, *vs );
#else
return -1;
#endif /* LDAP_SLAPI */
......@@ -682,7 +682,7 @@ slapi_entry_add_value(Slapi_Entry *e, const char *type, const Slapi_Value *value
return -1;
}
rc = attr_merge_one( e, ad, (Slapi_Value *)value );
rc = attr_mergeit_one( e, ad, (Slapi_Value *)value );
if ( rc != LDAP_SUCCESS ) {
return -1;
}
......@@ -794,7 +794,7 @@ slapi_entry_attr_replace_sv( Slapi_Entry *e, const char *type, Slapi_Value **val
return -1;
}
rc = attr_merge( e, ad, bv );
rc = attr_mergeit( e, ad, bv );
slapi_ch_free( (void **)&bv );
if ( rc != LDAP_SUCCESS ) {
return -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment