summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-15 14:38:36 +0200
committerMichael Adam <obnox@samba.org>2008-04-15 17:40:27 +0200
commit7624bab9631b004815decfeced58ee72ebe125cb (patch)
tree1f7667fe572ef60fb0184561286f5f6ff275cec2 /source3/utils
parent34e8ec54ce46a620515836b0d584dc1f59522e37 (diff)
downloadsamba-7624bab9631b004815decfeced58ee72ebe125cb.tar.gz
samba-7624bab9631b004815decfeced58ee72ebe125cb.tar.bz2
samba-7624bab9631b004815decfeced58ee72ebe125cb.zip
net conf: fix output of out-of-share parameters in test mode import
Michael (This used to be commit 5424e07e7d3e842488cba7ae389124f01221c5ba)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_conf.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 88cc15e0eb..7d1658ba94 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -150,10 +150,18 @@ static WERROR import_process_service(struct smbconf_ctx *conf_ctx,
TALLOC_CTX *mem_ctx = talloc_stackframe();
if (opt_testmode) {
- d_printf("[%s]\n", servicename);
- for (idx = 0; idx < num_params; idx ++) {
- d_printf("\t%s = %s\n", param_names[idx],
- param_values[idx]);
+ if (servicename != NULL) {
+ d_printf("[%s]\n", servicename);
+ for (idx = 0; idx < num_params; idx++) {
+ d_printf("\t%s = %s\n", param_names[idx],
+ param_values[idx]);
+ }
+ }
+ else {
+ for (idx = 0; idx < num_params; idx++) {
+ d_printf("%s = %s\n", param_names[idx],
+ param_values[idx]);
+ }
}
d_printf("\n");
goto done;