lib/param: fix parameter dumping to detect share and global parameters
authorGarming Sam <garming@catalyst.net.nz>
Tue, 31 Dec 2013 01:30:30 +0000 (14:30 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 28 Jan 2014 04:26:36 +0000 (17:26 +1300)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
lib/param/loadparm.c

index d35f3f8c5b2bd494dd514f67bb15f440911a3b68..8ade5623b987cb53674bf2f3b3a761bd6974b903 100644 (file)
@@ -1911,6 +1911,10 @@ bool lpcfg_dump_a_parameter(struct loadparm_context *lp_ctx,
                return false;
        }
 
+       if (service != NULL && parm->p_class == P_GLOBAL) {
+               return false;
+       }
+
        ptr = lpcfg_parm_ptr(lp_ctx, service,parm);
 
        print_parameter(parm, ptr, f);