param: Add non-global smb.cfg option (support 2 different smb.confs)
commit5728867ddcc4487bde53a11cf865563b59624eb1
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Mon, 30 Apr 2018 23:10:36 +0000 (1 11:10 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 Jun 2018 01:34:27 +0000 (28 03:34 +0200)
tree2507d4395f7be1fe0b083506d232dad49e6db2ff
parentf0aad4a18736cbcbb3c87dd03cf24ae190fe8b4f
param: Add non-global smb.cfg option (support 2 different smb.confs)

The default behaviour is that there is only a single global underlying
LoadParm object. E.g. if you create 2 different LoadParm objects in
python, they both modify the same underlying object.

This patch adds a mechanism to override this and create a separate
non-global LoadParm object. The use-case is the backup tool, where we
want to manipulate 2 different smb.conf files (the one used to create
the backup, and the smb.conf in the backup itself).

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/param/loadparm.c
source4/param/pyparam.c