From e0faae07b42941dec05ad9d45c8fdb5d407fe89d Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 29 Apr 2021 20:21:37 +0200 Subject: [PATCH] Fix for "GPO restore fails if an empty REG_MULTI_SZ is encountered in registry.pol.xml" #14687 --- python/samba/gp_parse/gp_pol.py | 2 +- .../Machine/Registry.pol.SAMBABACKUP | Bin 18426 -> 19186 bytes .../Machine/Registry.pol.xml | 22 +++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/python/samba/gp_parse/gp_pol.py b/python/samba/gp_parse/gp_pol.py index 8a3d5f58ec1..0604edb8d0a 100644 --- a/python/samba/gp_parse/gp_pol.py +++ b/python/samba/gp_parse/gp_pol.py @@ -76,7 +76,7 @@ class GPPolParser(GPParser): # entry.size = int(e.attrib['size']) if misc.REG_MULTI_SZ == entry_type: - values = [x.text for x in e.findall('Value')] + values = [x.text for x in e.findall('Value') if x.text] entry.data = (u'\x00'.join(values) + u'\x00\x00').encode('utf-16le') elif (misc.REG_NONE == entry_type): pass diff --git a/source4/selftest/provisions/generalized-gpo-backup/policy/{1E1DC8EA-390C-4800-B327-98B56A0AEA5D}/Machine/Registry.pol.SAMBABACKUP b/source4/selftest/provisions/generalized-gpo-backup/policy/{1E1DC8EA-390C-4800-B327-98B56A0AEA5D}/Machine/Registry.pol.SAMBABACKUP index 2a15aacd96dab84405a7be461f64d87d61b03801..c5b17f5fb3d7d1696297574174dec9be0174a32f 100644 GIT binary patch delta 518 zcmey>&-iI7 + SOFTWARE\Policies\Microsoft\NetworkAccessProtection\ClientConfig\Enroll\HcsGroups @@ -413,4 +413,24 @@ Version 2 + + Software\Policies\Microsoft\Windows\AppPrivacy + LetAppsAccessCamera + 0 + + + Software\Policies\Microsoft\Windows\AppPrivacy + LetAppsAccessCamera_UserInControlOfTheseApps + + + + Software\Policies\Microsoft\Windows\AppPrivacy + LetAppsAccessCamera_ForceAllowTheseApps + + + + Software\Policies\Microsoft\Windows\AppPrivacy + LetAppsAccessCamera_ForceDenyTheseApps + + \ No newline at end of file -- 2.25.1