diff options
author | Tim Potter <tpot@samba.org> | 2006-05-02 05:14:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:31 -0500 |
commit | 684aa5adef7c8f61e626983ef2a79156fcb14f3d (patch) | |
tree | 9fcae0a4ad95a433f377b8d8ee3564f5a1e16600 /source4/lib/ldb/swig/ldb.i | |
parent | 827cdb949ba22e05f88c03028acb747ca437f4e3 (diff) | |
download | samba-684aa5adef7c8f61e626983ef2a79156fcb14f3d.tar.gz samba-684aa5adef7c8f61e626983ef2a79156fcb14f3d.tar.bz2 samba-684aa5adef7c8f61e626983ef2a79156fcb14f3d.zip |
r15389: Add some better torture tests for LdbMessage.
Fix up behaviour of Ldb.__setitem__() function. It should overwrite the
element data.
Add wrapper for ldb_msg_sanity_check().
(This used to be commit d67e055f86a62d0e61fd20d75b252a6211618f7b)
Diffstat (limited to 'source4/lib/ldb/swig/ldb.i')
-rw-r--r-- | source4/lib/ldb/swig/ldb.i | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source4/lib/ldb/swig/ldb.i b/source4/lib/ldb/swig/ldb.i index 744857b0a5..09d3461c2a 100644 --- a/source4/lib/ldb/swig/ldb.i +++ b/source4/lib/ldb/swig/ldb.i @@ -199,13 +199,18 @@ struct ldb_result { * Wrap ldb functions */ -int ldb_global_init(void); +/* Initialisation */ +int ldb_global_init(void); struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx); +/* Error handling */ + const char *ldb_errstring(struct ldb_context *ldb); const char *ldb_strerror(int ldb_err); +/* Top-level ldb operations */ + int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[]); int ldb_search(struct ldb_context *ldb, const struct ldb_dn *base, enum ldb_scope scope, const char *expression, const char * const *attrs, struct ldb_result **OUT); @@ -216,9 +221,20 @@ int ldb_rename(struct ldb_context *ldb, const struct ldb_dn *olddn, const struct int ldb_add(struct ldb_context *ldb, const struct ldb_message *message); +/* Ldb message operations */ + struct ldb_message *ldb_msg_new(void *mem_ctx); + struct ldb_message_element *ldb_msg_find_element(const struct ldb_message *msg, const char *attr_name); + int ldb_msg_add_value(struct ldb_message *msg, const char *attr_name, const struct ldb_val *INPUT); +void ldb_msg_remove_attr(struct ldb_message *msg, const char *attr); + +int ldb_msg_sanity_check(struct ldb_message *msg); + +/* DN operations */ + struct ldb_dn *ldb_dn_explode(void *mem_ctx, const char *dn); + char *ldb_dn_linearize(void *mem_ctx, const struct ldb_dn *dn); |