summaryrefslogtreecommitdiff
path: root/python/samba/gp_parse/gp_pol.py
AgeCommit message (Collapse)AuthorFilesLines
2023-10-27gp_pol: Allow null data for REG_MULTI_SZGabriel Nagy1-1/+5
The parser is able to convert data from binary to XML (it generates an empty <Value> tag) but not the other way around. This is a common occurrence for empty multitext fields. Signed-off-by: Gabriel Nagy <gabriel.nagy@canonical.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2020-03-19python/samba/gp_parse: Fix test errors with python3.8Noel Power1-1/+1
UNEXPECTED(failure): samba.tests.samba_tool.gpo.samba.tests.samba_tool.gpo.GpoCmdTestCase.test_backup_restore_generalize(ad_dc:local) REASON: Exception: Exception: Traceback (most recent call last): File "/tmp/samba-testbase/b28/samba-ad-dc-1/bin/python/samba/tests/samba_tool/gpo.py", line 434, in test_backup_restore_generalize self.assertIsNone(has_difference(os.path.join(new_path, 'policy', This caused because prior to 3.8 minodom.toprettyxml() was sorting the attribute order, now it preserves the attribute order specified by the user Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-11-05python/samba/gp_parse: PY3 file -> openNoel Power1-2/+2
'file' no longer exists in PY3 replace with 'open' Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-10-25python/gp_parse/gp_pol: remove unused importDouglas Bagnall1-1/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-08-16gp_pol: Parse the .pol files (PReg) which stored winreg settingsGarming Sam1-0/+148
Currently, we do not look inside the .pol files for any settings (and do not generalize any so far). Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>