int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m ));
LDAP_SLAPD_F (int) mask_to_verbs LDAP_P((
slap_verbmasks *v, slap_mask_t m, BerVarray *bva ));
+LDAP_SLAPD_F (int) enum_to_verb LDAP_P((
+ slap_verbmasks *v, slap_mask_t m, struct berval *bv ));
LDAP_SLAPD_F (int) bindconf_parse LDAP_P((
const char *word, slap_bindconf *bc ));
LDAP_SLAPD_F (int) bindconf_unparse LDAP_P((
LDAP_SLAPD_F (void) bindconf_free LDAP_P(( slap_bindconf *bc ));
LDAP_SLAPD_F (int) config_generic_wrapper LDAP_P(( Backend *be,
const char *fname, int lineno, int argc, char **argv ));
+LDAP_SLAPD_F (char *) anlist_unparse LDAP_P(( AttributeName *, char * ));
#ifdef LDAP_SLAPI
LDAP_SLAPD_V (int) slapi_plugins_used;
LDAP_SLAPD_F (Entry *) str2entry2 LDAP_P(( char *s, int checkvals ));
LDAP_SLAPD_F (char *) entry2str LDAP_P(( Entry *e, int *len ));
-LDAP_SLAPD_F (void) entry_flatsize LDAP_P((
- Entry *e, ber_len_t *siz, ber_len_t *len, int norm ));
+LDAP_SLAPD_F (ber_len_t) entry_flatsize LDAP_P(( Entry *e, int norm ));
+LDAP_SLAPD_F (void) entry_partsize LDAP_P(( Entry *e, ber_len_t *len,
+ int *nattrs, int *nvals, int norm ));
+
#ifdef SLAP_ZONE_ALLOC
LDAP_SLAPD_F (int) entry_decode LDAP_P((
struct berval *bv, Entry **e, void *ctx ));
/*
* modify.c
*/
-LDAP_SLAPD_F( int ) slap_mods_no_update_check(
+LDAP_SLAPD_F( int ) slap_mods_obsolete_check(
+ Operation *op,
+ Modifications *ml,
+ const char **text,
+ char *textbuf, size_t textlen );
+
+LDAP_SLAPD_F( int ) slap_mods_no_user_mod_check(
+ Operation *op,
Modifications *ml,
const char **text,
char *textbuf, size_t textlen );
Modification *mod,
int permissive,
const char **text, char *textbuf, size_t textlen );
+LDAP_SLAPD_F( int ) modify_delete_vindex( Entry *e,
+ Modification *mod,
+ int permissive,
+ const char **text, char *textbuf, size_t textlen, int *idx );
LDAP_SLAPD_F( int ) modify_replace_values( Entry *e,
Modification *mod,
int permissive,
LDAP_SLAPD_F (int) read_root_dse_file LDAP_P((
const char *file));
+LDAP_SLAPD_F (int) slap_discover_feature LDAP_P((
+ const char *uri,
+ int version,
+ const char *attr,
+ const char *val ));
+
/*
* sasl.c
*/
char *textbuf, size_t textlen );
LDAP_SLAPD_F( int ) entry_schema_check(
- Backend *be, Entry *e, Attribute *attrs,
+ Backend *be,
+ Entry *e,
+ Attribute *attrs,
+ int manage,
const char** text,
char *textbuf, size_t textlen );
* syncrepl.c
*/
-LDAP_SLAPD_F (void) init_syncrepl LDAP_P((syncinfo_t *));
-LDAP_SLAPD_F (void*) do_syncrepl LDAP_P((void *, void *));
-LDAP_SLAPD_F (int) syncrepl_message_to_entry LDAP_P((
- syncinfo_t *, Operation *, LDAPMessage *,
- Modifications **, Entry **, int ));
-LDAP_SLAPD_F (int) syncrepl_entry LDAP_P((
- syncinfo_t *, Operation*, Entry*,
- Modifications**,int, struct berval*,
- struct sync_cookie *,
- struct berval * ));
-LDAP_SLAPD_F (void) syncrepl_updateCookie LDAP_P((
- syncinfo_t *, Operation *, struct berval *,
- struct sync_cookie * ));
LDAP_SLAPD_F (void) syncrepl_add_glue LDAP_P((
Operation*, Entry* ));
-LDAP_SLAPD_F (Entry*) slap_create_syncrepl_entry LDAP_P((
- Backend *, struct berval *,
- struct berval *, struct berval * ));
-LDAP_SLAPD_F (struct berval *) slap_uuidstr_from_normalized LDAP_P((
- struct berval *, struct berval *, void * ));
-LDAP_SLAPD_F (void) syncinfo_free LDAP_P(( syncinfo_t * ));
+LDAP_SLAPD_F (void) syncinfo_free LDAP_P(( struct syncinfo_s * ));
/* syntax.c */
LDAP_SLAPD_F (Syntax *) syn_find LDAP_P((
LDAP_SLAPD_V (int) global_gentlehup;
LDAP_SLAPD_V (int) global_idletimeout;
-LDAP_SLAPD_V (int) global_schemacheck;
LDAP_SLAPD_V (char *) global_host;
LDAP_SLAPD_V (char *) global_realm;
LDAP_SLAPD_V (char **) default_passwd_hash;
#endif
LDAP_SLAPD_F (int) fe_extended LDAP_P((Operation *op, SlapReply *rs));
+/* NOTE: this macro assumes that bv has been allocated
+ * by ber_* malloc functions or is { 0L, NULL } */
+#if defined(HAVE_BIGNUM)
+#define UI2BVX(bv,ui,ctx) \
+ do { \
+ char *val; \
+ ber_len_t len; \
+ val = BN_bn2dec(ui); \
+ if (val) { \
+ len = strlen(val); \
+ if ( len > (bv)->bv_len ) { \
+ (bv)->bv_val = ber_memrealloc_x( (bv)->bv_val, len + 1, (ctx) ); \
+ } \
+ AC_MEMCPY((bv)->bv_val, val, len + 1); \
+ (bv)->bv_len = len; \
+ OPENSSL_free(val); \
+ } else { \
+ ber_memfree_x( (bv)->bv_val, (ctx) ); \
+ BER_BVZERO( (bv) ); \
+ } \
+ } while ( 0 )
+#elif defined(HAVE_GMP)
+/* NOTE: according to the documentation, the result
+ * of mpz_sizeinbase() can exceed the length of the
+ * string representation of the number by 1
+ */
+#define UI2BVX(bv,ui,ctx) \
+ do { \
+ ber_len_t len = mpz_sizeinbase( (ui), 10 ); \
+ if ( len > (bv)->bv_len ) { \
+ (bv)->bv_val = ber_memrealloc_x( (bv)->bv_val, len + 1, (ctx) ); \
+ } \
+ (void)mpz_get_str( (bv)->bv_val, 10, (ui) ); \
+ if ( (bv)->bv_val[ len - 1 ] == '\0' ) { \
+ len--; \
+ } \
+ (bv)->bv_len = len; \
+ } while ( 0 )
+#else /* ! HAVE_BIGNUM && ! HAVE_GMP */
+#define UI2BVX(bv,ui,ctx) \
+ do { \
+ char buf[] = "+9223372036854775807L"; \
+ ber_len_t len; \
+ snprintf( buf, sizeof( buf ), "%lu", (ui) ); \
+ len = strlen( buf ); \
+ if ( len > (bv)->bv_len ) { \
+ (bv)->bv_val = ber_memrealloc_x( (bv)->bv_val, len + 1, (ctx) ); \
+ } \
+ AC_MEMCPY( (bv)->bv_val, buf, len + 1 ); \
+ } while ( 0 )
+#endif /* ! HAVE_GMP */
+
+#define UI2BV(bv,ui) UI2BVX(bv,ui,NULL)
+
LDAP_END_DECL
#endif /* PROTO_SLAP_H */