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,
/*
* 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
*/
ObjectClass *sup ));
LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P((
- Entry *, ObjectClass *oc ));
+ Entry *, ObjectClass *oc, int set_flags ));
#define is_entry_alias(e) \
- is_entry_objectclass((e), slap_schema.si_oc_alias)
+ (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_ALIAS) : \
+ is_entry_objectclass((e), slap_schema.si_oc_alias, 1))
#define is_entry_referral(e) \
- is_entry_objectclass((e), slap_schema.si_oc_referral)
+ (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_REFERRAL) : \
+ is_entry_objectclass((e), slap_schema.si_oc_referral, 1))
#define is_entry_subentry(e) \
- is_entry_objectclass((e), slap_schema.si_oc_subentry)
-#define is_entry_collectiveAttributes(e) \
- is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributes)
+ (((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_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) \
- is_entry_objectclass((e), slap_schema.si_oc_dynamicObject)
+ (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_DYNAMICOBJECT) : \
+ is_entry_objectclass((e), slap_schema.si_oc_dynamicObject, 1))
LDAP_SLAPD_F (int) oc_schema_info( Entry *e );