summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-01-26 16:37:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:31 -0500
commitd346794a8d962de209cc3a111c73e23553c9a767 (patch)
tree055fc5b91d50a92d874d0e9375577726e64630d8 /source4/lib/ldb/include
parent34a03295d26d96302b4420c673afb33bdf875e77 (diff)
downloadsamba-d346794a8d962de209cc3a111c73e23553c9a767.tar.gz
samba-d346794a8d962de209cc3a111c73e23553c9a767.tar.bz2
samba-d346794a8d962de209cc3a111c73e23553c9a767.zip
r13166: Patches form Brad Hards
(This used to be commit 335050b30d832f529fb8fdd4f96e4bb3de93f38c)
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 9a637ff9d5..087790ac68 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -276,7 +276,37 @@ struct ldb_parse_tree {
struct ldb_parse_tree *ldb_parse_tree(void *mem_ctx, const char *s);
char *ldb_filter_from_tree(void *mem_ctx, struct ldb_parse_tree *tree);
+
+/**
+ Encode a binary blob
+
+ This function encodes a binary blob using the encoding rules in RFC
+ 2254 (Section 4). This function also escapes any non-printable
+ characters.
+
+ \param ctx the memory context to allocate the return string in.
+ \param val the (potentially) binary data to be encoded
+
+ \return the encoded data as a null terminated string
+
+ \sa <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>.
+*/
char *ldb_binary_encode(void *ctx, struct ldb_val val);
+
+/**
+ Encode a string
+
+ This function encodes a string using the encoding rules in RFC 2254
+ (Section 4). This function also escapes any non-printable
+ characters.
+
+ \param mem_ctx the memory context to allocate the return string in.
+ \param string the string to be encoded
+
+ \return the encoded data as a null terminated string
+
+ \sa <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>.
+*/
char *ldb_binary_encode_string(void *mem_ctx, const char *string);
/*
@@ -328,7 +358,7 @@ struct ldb_attrib_handler {
This is the well-known LDAP attribute syntax for a Directory String.
- See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
+ \sa <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
*/
#define LDB_SYNTAX_DIRECTORY_STRING "1.3.6.1.4.1.1466.115.121.1.15"
@@ -532,7 +562,7 @@ struct ldb_request {
struct ldb_control **controls;
struct ldb_credentials *creds;
-};
+};
int ldb_request(struct ldb_context *ldb, struct ldb_request *request);