Rev 5334: make setparm create the share (key) if it does not exist.
in http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
Michael Adam
ma at sernet.de
Wed Apr 4 23:06:40 GMT 2007
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
------------------------------------------------------------
revno: 5334
revision-id: ma at sernet.de-20070404230636-f0e434ff3be3365f
parent: ma at sernet.de-20070404230049-c0a9bc8f2a01865a
committer: Michael Adam <ma at sernet.de>
branch nick: SAMBA_3_0-registry.bzr
timestamp: Thu 2007-04-05 01:06:36 +0200
message:
make setparm create the share (key) if it does not exist.
is this a good idea? at this moment, I think so ...
especially useful for [global]
modified:
source/utils/net_conf.c net_conf.c-20070228210606-uywdn1acd043wgvt-1
=== modified file 'source/utils/net_conf.c'
--- a/source/utils/net_conf.c 2007-04-04 23:00:49 +0000
+++ b/source/utils/net_conf.c 2007-04-04 23:06:36 +0000
@@ -922,7 +922,12 @@
type = strdup_lower(argv[2]);
value_str = argv[3];
- werr = smbconf_open_path(ctx, service, REG_KEY_READ, &key);
+ if (!smbconf_key_exists(ctx, service)) {
+ werr = reg_createkey_internal(ctx, service, &key);
+ }
+ else {
+ werr = smbconf_open_path(ctx, service, REG_KEY_READ, &key);
+ }
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
More information about the samba-cvs
mailing list