diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 2648aa2e81..1ab1378910 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -834,7 +834,6 @@ static int net_conf_setparm(int argc, const char **argv) { int ret = -1; WERROR werr = WERR_OK; - struct registry_key *key = NULL; char *service = NULL; char *param = NULL; const char *value_str = NULL; @@ -850,23 +849,14 @@ static int net_conf_setparm(int argc, const char **argv) param = strdup_lower(argv[1]); value_str = argv[2]; - if (!libnet_smbconf_key_exists(ctx, service)) { - werr = libnet_reg_createkey_internal(ctx, service, &key); - } else { - werr = libnet_smbconf_open_path(ctx, service, REG_KEY_WRITE, &key); - } - if (!W_ERROR_IS_OK(werr)) { - goto done; - } + werr = libnet_smbconf_setparm(ctx, service, param, value_str); - werr = libnet_smbconf_reg_setvalue_internal(key, param, value_str); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, "Error setting value '%s': %s\n", param, dos_errstr(werr)); goto done; } - ret = 0; done: |