diff options
author | Günther Deschner <gd@samba.org> | 2008-11-10 20:35:41 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-10 21:46:25 +0100 |
commit | c8a8c2388b32977a54daf854f14c278a18824594 (patch) | |
tree | efa40d5843024ab0d8dced7d0bde0aed730f4c61 /source4/dsdb | |
parent | e78379be0b829da3d41971182f468892a623dd7e (diff) | |
download | samba-c8a8c2388b32977a54daf854f14c278a18824594.tar.gz samba-c8a8c2388b32977a54daf854f14c278a18824594.tar.bz2 samba-c8a8c2388b32977a54daf854f14c278a18824594.zip |
s4-dsdb: add samdb_msg_add_parameters.
Guenther
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/common/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index de2073fee0..2161286e08 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, |