diff options
author | Michael Adam <obnox@samba.org> | 2007-06-29 13:07:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:42 -0500 |
commit | e388130aa63b9bbe1b27999aad6052585fc2e16b (patch) | |
tree | cef52bb6091bd0cb6f61c982140bcacca71077c7 /source3/utils | |
parent | 20733036644c11a6b4fa7466f9a5b3aa1cae3916 (diff) | |
download | samba-e388130aa63b9bbe1b27999aad6052585fc2e16b.tar.gz samba-e388130aa63b9bbe1b27999aad6052585fc2e16b.tar.bz2 samba-e388130aa63b9bbe1b27999aad6052585fc2e16b.zip |
r23657: Prevent setting of a global option in a share definition
in "net conf setparm".
Michael
(This used to be commit bf92d567984f00ebb998fb2485d0aac87d30b924)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 5af2d6ccc5..1c61a25ee9 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -178,12 +178,21 @@ static WERROR reg_setvalue_internal(struct registry_key *key, } if (registry_smbconf_valname_forbidden(valname)) { - d_fprintf(stderr, "Parameter '%s' not allowed in registry.\n", + d_fprintf(stderr, "Parameter '%s' not allowed in registry.\n", valname); werr = WERR_INVALID_PARAM; goto done; } + if (!strequal(key->key->name, GLOBAL_NAME) && + lp_parameter_is_global(valname)) + { + d_fprintf(stderr, "Global paramter '%s' not allowed in " + "service definition.\n", valname); + werr = WERR_INVALID_PARAM; + goto done; + } + werr = reg_setvalue(key, valname, &val); if (!W_ERROR_IS_OK(werr)) { d_fprintf(stderr, |