From: David Mulder Date: Thu, 24 Mar 2022 17:35:02 +0000 (-0600) Subject: samba-tool: Test gpo show/load handling of utf-16-le strings X-Git-Tag: tevent-0.14.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4530c153e38b205f0ffa7f30e06d2a4469fa58b;p=thirdparty%2Fsamba.git samba-tool: Test gpo show/load handling of utf-16-le strings Signed-off-by: David Mulder Reviewed-by: Andrew Bartlett Tested-by: Kees van Vloten --- diff --git a/python/samba/tests/samba_tool/gpo.py b/python/samba/tests/samba_tool/gpo.py index 9849207fbe4..ae19a573711 100644 --- a/python/samba/tests/samba_tool/gpo.py +++ b/python/samba/tests/samba_tool/gpo.py @@ -65,6 +65,17 @@ b""" "class": "USER", "type": "REG_DWORD", "data": 1 + }, + { + "keyname": "Software\\\\Policies\\\\Mozilla\\\\Firefox", + "valuename": "ExtensionSettings", + "class": "MACHINE", + "type": "REG_MULTI_SZ", + "data": [ + "{", + " \\"key\\": \\"value\\"", + "}" + ] } ] """ @@ -91,6 +102,11 @@ b""" "keyname": "Software\\\\Policies\\\\Microsoft\\\\InputPersonalization", "valuename": "RestrictImplicitTextCollection", "class": "USER" + }, + { + "keyname": "Software\\\\Policies\\\\Mozilla\\\\Firefox", + "valuename": "ExtensionSettings", + "class": "MACHINE" } ] """ @@ -1615,6 +1631,8 @@ class GpoCmdTestCase(SambaToolCmdTest): '\n "class": "USER",' + \ '\n "type": "REG_DWORD",\n "data": 1\n' self.assertIn(restrict_data, out, 'Restrict policy not loaded') + ext_data = '" \\"key\\": \\"value\\"",' + self.assertIn(ext_data, out, 'Extension policy not loaded') with NamedTemporaryFile() as f: f.write(gpo_remove_json)