summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-09-30 15:21:37 +0200
committerGünther Deschner <gd@samba.org>2009-09-30 16:23:33 +0200
commit05e8e90976e86689425ccafc9ecfc1d99c53a3db (patch)
tree7510d37806014a63cc995cf433c7b0a1b20ea3f4 /source3
parenta6567cf198f9d1c9df0f34c463cec3b9f0aa2e54 (diff)
downloadsamba-05e8e90976e86689425ccafc9ecfc1d99c53a3db.tar.gz
samba-05e8e90976e86689425ccafc9ecfc1d99c53a3db.tar.bz2
samba-05e8e90976e86689425ccafc9ecfc1d99c53a3db.zip
s3-registry: add regval_ctr_addvalue_multi_sz.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/registry/reg_objects.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e192ee9edf..25b04fe510 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5120,6 +5120,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
const char *data_p, size_t size);
int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data);
int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 908cda5d2e..21ebba6540 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -507,6 +507,23 @@ int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char
}
/***********************************************************************
+ Add a new registry MULTI_SZ value to the array
+ **********************************************************************/
+
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data)
+{
+ DATA_BLOB blob;
+
+ if (!push_reg_multi_sz(ctr, &blob, data)) {
+ return -1;
+ }
+
+ return regval_ctr_addvalue(ctr, name, REG_MULTI_SZ,
+ (const char *)blob.data,
+ blob.length);
+}
+
+/***********************************************************************
Add a new registry value to the array
**********************************************************************/