LDAP_SLAPD_F (void) ad_destroy LDAP_P(( AttributeDescription * ));
-#define ad_cmp(l,r) (((l)->ad_cname.bv_len == (r)->ad_cname.bv_len) \
- ? strcasecmp((l)->ad_cname.bv_val, (r)->ad_cname.bv_val ) : 1 )
+#define ad_cmp(l,r) (((l)->ad_cname.bv_len < (r)->ad_cname.bv_len) \
+ ? -1 : (((l)->ad_cname.bv_len > (r)->ad_cname.bv_len) \
+ ? 1 : strcasecmp((l)->ad_cname.bv_val, (r)->ad_cname.bv_val )))
LDAP_SLAPD_F (int) is_ad_subtype LDAP_P((
AttributeDescription *sub,
int noSubordinates ));
LDAP_SLAPD_F (int) be_issuffix LDAP_P(( Backend *be,
- const char *suffix ));
+ struct berval *suffix ));
LDAP_SLAPD_F (int) be_isroot LDAP_P(( Backend *be,
struct berval *ndn ));
LDAP_SLAPD_F (int) be_isroot_pw LDAP_P(( Backend *be,
#define dn_match(dn1, dn2) ( ber_bvcmp((dn1), (dn2)) == 0 )
+LDAP_SLAPD_V( const struct berval ) slap_empty_bv;
+
LDAP_SLAPD_F (int) dnValidate LDAP_P((
Syntax *syntax,
struct berval *val ));
struct berval * parent_dn,
struct berval * newrdn ));
-LDAP_SLAPD_F (int) dnParent LDAP_P(( const char *dn, const char **pdn ));
+LDAP_SLAPD_F (int) dnParent LDAP_P(( struct berval *dn, struct berval *pdn ));
#define SLAP_DN_MIGRATION
#ifdef SLAP_DN_MIGRATION
/*
* modify.c
- * should be relocated to separate file
*/
-LDAP_SLAPD_F( void ) slap_mod_free( Modification *mod, int freeit );
-LDAP_SLAPD_F( void ) slap_mods_free( Modifications *mods );
-LDAP_SLAPD_F( void ) slap_modlist_free( LDAPModList *ml );
-
LDAP_SLAPD_F( int ) slap_mods_check(
Modifications *ml,
int update,
const char **text,
char *textbuf, size_t textlen );
-LDAP_SLAPD_F( int ) slap_modlist2mods(
- LDAPModList *ml,
- int update,
- Modifications **mods,
- const char **text,
- char *textbuf, size_t textlen );
-
LDAP_SLAPD_F( int ) slap_mods_opattrs(
Operation *op,
Modifications *mods,
const char **text,
char *textbuf, size_t textlen );
+/*
+ * mods.c
+ */
+LDAP_SLAPD_F( int ) modify_add_values( Entry *e,
+ Modification *mod,
+ const char **text, char *textbuf, size_t textlen );
+LDAP_SLAPD_F( int ) modify_delete_values( Entry *e,
+ Modification *mod,
+ const char **text, char *textbuf, size_t textlen );
+LDAP_SLAPD_F( int ) modify_replace_values( Entry *e,
+ Modification *mod,
+ const char **text, char *textbuf, size_t textlen );
+
+LDAP_SLAPD_F( void ) slap_mod_free( Modification *mod, int freeit );
+LDAP_SLAPD_F( void ) slap_mods_free( Modifications *mods );
+LDAP_SLAPD_F( void ) slap_modlist_free( LDAPModList *ml );
+
/*
* module.c
*/
#define is_entry_subentry(e) \
(((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_SUBENTRY) : \
is_entry_objectclass((e), slap_schema.si_oc_subentry, 1))
-#define is_entry_collectiveAttributes(e) \
- (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_COLLECTIVEATTRIBUTES) : \
- is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributes, 1))
+#define is_entry_collectiveAttributeSubentry(e) \
+ (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY) : \
+ is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributeSubentry, 1))
#define is_entry_dynamicObject(e) \
(((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_DYNAMICOBJECT) : \
is_entry_objectclass((e), slap_schema.si_oc_dynamicObject, 1))