summaryrefslogtreecommitdiff
path: root/source3/utils/net_conf.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-31 03:02:39 +0100
committerMichael Adam <obnox@samba.org>2007-12-31 03:02:39 +0100
commit8d9fb62a4593525a84104665d0a5318e16993d9e (patch)
tree93b69ff278ed2a41dfb8435f2fd9131fd0025e5d /source3/utils/net_conf.c
parent01f8fd55a7f9cb9cc90e3d2b53397412a7bad714 (diff)
downloadsamba-8d9fb62a4593525a84104665d0a5318e16993d9e.tar.gz
samba-8d9fb62a4593525a84104665d0a5318e16993d9e.tar.bz2
samba-8d9fb62a4593525a84104665d0a5318e16993d9e.zip
Change net_conf_import() to only use libnet_conf API functions.
More precisely, only import_process_service() is changed. This removes all references to registry code from net_conf.c. net_conf_import() is currently -- like net_conf_addshare() -- also considered a high-level add-on, not an API function. Michael (This used to be commit b4dca117c09ddb9c8e7eea25c6cde3fbef8c692b)
Diffstat (limited to 'source3/utils/net_conf.c')
-rw-r--r--source3/utils/net_conf.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 9e4d4300d5..1882567d8b 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -191,7 +191,6 @@ static int import_process_service(TALLOC_CTX *ctx,
struct parm_struct *parm;
int pnum = 0;
const char *servicename;
- struct registry_key *key;
WERROR werr;
char *valstr = NULL;
TALLOC_CTX *tmp_ctx = NULL;
@@ -214,12 +213,6 @@ static int import_process_service(TALLOC_CTX *ctx,
goto done;
}
}
- werr = libnet_smbconf_reg_createkey_internal(tmp_ctx, servicename, &key);
- if (!W_ERROR_IS_OK(werr)) {
- d_fprintf(stderr, "Error creating share %s: %s\n",
- servicename, dos_errstr(werr));
- goto done;
- }
}
while ((parm = lp_next_parameter(share->service, &pnum, 0)))
@@ -234,8 +227,9 @@ static int import_process_service(TALLOC_CTX *ctx,
if (opt_testmode) {
d_printf("\t%s = %s\n", parm->label, valstr);
} else {
- werr = libnet_smbconf_reg_setvalue_internal(key,
- parm->label, valstr);
+ werr = libnet_smbconf_setparm(servicename,
+ parm->label,
+ valstr);
if (!W_ERROR_IS_OK(werr)) {
d_fprintf(stderr,
"Error setting parameter '%s'"