summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-08-26 15:59:00 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-08-26 15:59:00 +1000
commit425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95 (patch)
tree645da53767294cab003826df87a2502505c798b5 /source4/lib/ldb/include
parent3ed33813bb6aa1ca932372c2a2ce36152b6af50b (diff)
downloadsamba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.tar.gz
samba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.tar.bz2
samba-425386ff6141bba2e7b1d8f3c27e96aaf1c5cb95.zip
s4:ldb Add ldb_ldif_write_string() and python wrappers
This allows us to turn a python LdbMessage back into a string. Andrew Bartlett
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 20f0f9cc5a..8972fc83e9 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -1450,6 +1450,20 @@ struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char **s);
int ldb_ldif_write_file(struct ldb_context *ldb, FILE *f, const struct ldb_ldif *msg);
/**
+ Write an LDIF message to a string
+
+ \param ldb the ldb context (from ldb_init())
+ \param mem_ctx the talloc context on which to attach the string)
+ \param msg the message to write out
+
+ \return the string containing the LDIF, or NULL on error
+
+ \sa ldb_ldif_read_string for the reader equivalent to this function.
+*/
+char * ldb_ldif_write_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
+ const struct ldb_ldif *msg);
+
+/**
Base64 encode a buffer
\param mem_ctx the memory context that the result is allocated