summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-10 20:35:41 +0100
committerGünther Deschner <gd@samba.org>2008-11-10 21:46:25 +0100
commitc8a8c2388b32977a54daf854f14c278a18824594 (patch)
treeefa40d5843024ab0d8dced7d0bde0aed730f4c61 /source4
parente78379be0b829da3d41971182f468892a623dd7e (diff)
downloadsamba-c8a8c2388b32977a54daf854f14c278a18824594.tar.gz
s4-dsdb: add samdb_msg_add_parameters.
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index de2073fee04..2161286e08c 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -919,6 +919,17 @@ int samdb_msg_add_logon_hours(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx,
}
/*
+ add a parameters element to a message
+*/
+int samdb_msg_add_parameters(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
+ const char *attr_name, struct lsa_BinaryString *parameters)
+{
+ struct ldb_val val;
+ val.length = parameters->length * 2;
+ val.data = (uint8_t *)parameters->array;
+ return ldb_msg_add_value(msg, attr_name, &val, NULL);
+}
+/*
add a general value element to a message
*/
int samdb_msg_add_value(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,