gpo: Backup a policy folder containing GPE.INI
authorGarming Sam <garming@catalyst.net.nz>
Thu, 7 Mar 2019 22:22:55 +0000 (11:22 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 12 Mar 2019 01:41:32 +0000 (01:41 +0000)
The GPE.INI file does not appear to be documented anywhere in the
protocol specifications and seems to be due to legacy code. It appears
that it used to be how the gPCUserExtensionNames and
gPCMachineExtensionNames were maintained without the requirement for
LDAP.

All we do is ignore the parsing of this file and copy it over as binary.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13825

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 12 01:41:32 UTC 2019 on sn-devel-144

python/samba/netcmd/gpo.py

index 3c87592f123813f4bfc6d53e2f373ee3b50ae7ef..5a0258196c32b4a9167cc219c83306776643fc6a 100644 (file)
@@ -261,6 +261,12 @@ def find_parser(name, flags=re.IGNORECASE):
         return GPScriptsIniParser()
     if re.match('psscripts.ini$', name, flags=flags):
         return GPScriptsIniParser()
+    if re.match('GPE\.INI$', name, flags=flags):
+        # This file does not appear in the protocol specifications!
+        #
+        # It appears to be a legacy file used to maintain gPCUserExtensionNames
+        # and gPCMachineExtensionNames. We should just copy the file as binary.
+        return GPParser()
     if re.match('.*\.ini$', name, flags=flags):
         return GPIniParser()
     if re.match('.*\.pol$', name, flags=flags):