summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-06-19 21:40:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:27 -0500
commit3b9e5d0b4f6fb010fe227dcf303fa612189dee8e (patch)
tree83af5df6718f30533570dc660ae94fa84b7831a2 /source3/utils
parent0d4e977f5d4a05d01fe9a444623675d55a75b676 (diff)
downloadsamba-3b9e5d0b4f6fb010fe227dcf303fa612189dee8e.tar.gz
samba-3b9e5d0b4f6fb010fe227dcf303fa612189dee8e.tar.bz2
samba-3b9e5d0b4f6fb010fe227dcf303fa612189dee8e.zip
r23549: Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from "net conf setparm <section> <param> <type> <value>" to "net conf setparm <section> <param> <value>". Micheal (This used to be commit 41a8f8ec5f5361f536d047c4ca5d90203b16ff06)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_conf.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 15b67b3856..23a6c9fa8f 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -82,8 +82,7 @@ static int net_conf_delshare_usage(int argc, const char **argv)
static int net_conf_setparm_usage(int argc, const char **argv)
{
- d_printf("USAGE: net conf setparm <section> <param> <type> <value>\n"
- "\t(Supported types are 'dword' and 'sz' by now.)\n");
+ d_printf("USAGE: net conf setparm <section> <param> <value>\n");
return -1;
}
@@ -918,20 +917,18 @@ static int net_conf_setparm(int argc, const char **argv)
struct registry_key *key = NULL;
char *service = NULL;
char *param = NULL;
- char *type = NULL;
const char *value_str = NULL;
TALLOC_CTX *ctx;
ctx = talloc_init("setparm");
- if (argc != 4) {
+ if (argc != 3) {
net_conf_setparm_usage(argc, argv);
goto done;
}
service = strdup_lower(argv[0]);
param = strdup_lower(argv[1]);
- type = strdup_lower(argv[2]);
- value_str = argv[3];
+ value_str = argv[2];
if (!smbconf_key_exists(ctx, service)) {
werr = reg_createkey_internal(ctx, service, &key);
@@ -943,7 +940,7 @@ static int net_conf_setparm(int argc, const char **argv)
goto done;
}
- werr = reg_setvalue_internal(key, param, type, value_str);
+ werr = reg_setvalue_internal(key, param, "sz", value_str);
if (!W_ERROR_IS_OK(werr)) {
d_fprintf(stderr, "Error setting value '%s': %s\n",
param, dos_errstr(werr));