summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_srvsvc_nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_srvsvc_nt.c')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 1b86fa349f..abfa794518 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1375,10 +1375,18 @@ char *valid_share_pathname(char *dos_pathname)
static void setval_helper(struct registry_key *key, const char *name,
const char *value, WERROR *err)
{
+ struct registry_value val;
+
if (!W_ERROR_IS_OK(*err)) {
return;
}
- *err = reg_set_sz(key, name, value);
+
+ ZERO_STRUCT(val);
+ val.type = REG_SZ;
+ val.v.sz.str = CONST_DISCARD(char *, value);
+ val.v.sz.len = strlen(value)+1;
+
+ *err = reg_setvalue(key, name, &val);
}
static WERROR add_share(const char *share_name, const char *path,