running this command: # samba-tool testparm --supress-prompt -s /root/some_other_smb.conf --section-name=global will output: ERROR: Unknown section global Even though there is an ordinary global section present there. With out the "-s some_other_smb.conf" option this is working correctly.
I can reproduce in a testenv with $ bin/samba-tool testparm --suppress-prompt -s st/ad_dc/etc/smb.conf --section-name=global but I think only "global" is broken? $ bin/samba-tool testparm --suppress-prompt -s st/ad_dc/etc/smb.conf --section-name=xattr [xattr] path = /home/douglasb/src/samba/st/ad_dc/share vfs objects = streams_xattr acl_xattr Fixes for https://bugzilla.samba.org/show_bug.cgi?id=14143 changed things here. If I go --- a/python/samba/netcmd/testparm.py +++ b/python/samba/netcmd/testparm.py @@ -104,8 +104,12 @@ class cmd_testparm(Command): if section_name is not None or parameter_name is not None: if parameter_name is None: try: - section = lp[section_name] + if section_name == 'global': + section = lp.default_service + else: + section = lp[section_name] except KeyError: which *seems* plausible, I get a segfault.
This bug was referenced in samba master: 1c6e59a7dfcc0758606db835082bfe789356e382 5750d7a1d05bccf61b3ae0ea4dcb36e0c103cb26
This bug was referenced in samba v4-17-test: 1c6e59a7dfcc0758606db835082bfe789356e382 5750d7a1d05bccf61b3ae0ea4dcb36e0c103cb26
This bug was referenced in samba v4-17-stable (Release samba-4.17.0rc1): 1c6e59a7dfcc0758606db835082bfe789356e382 5750d7a1d05bccf61b3ae0ea4dcb36e0c103cb26