1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
samba-mirror/source4/selftest/provisions/generalized-gpo-backup
Garming Sam 0bcfc550b1 gp_inf: Read/write files with a UTF-16LE BOM in GptTmpl.inf
Regression caused by 16596842a6

[MS-GPSB] 2.2 Message Syntax says that you have to write a BOM which I
didn't do up until this patch. UTF-16 as input encoding was marked much
higher up in the inheritance tree, which got overriden with the Python 3
fixes. I've now marked the encoding much more obviously for this file.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Fri Jul 19 02:20:47 UTC 2019 on sn-devel-184
2019-07-19 02:20:47 +00:00
..
policy/{1E1DC8EA-390C-4800-B327-98B56A0AEA5D} gp_inf: Read/write files with a UTF-16LE BOM in GptTmpl.inf 2019-07-19 02:20:47 +00:00
entities
format.dtd
README

This backup was created by running:

1. samba-tool gpo backup {2F840485-D0DE-4201-A1AB-F49557E52C15} --generalize /tmp/entities

   With a GPO built from Windows GPO editor, export it out.

2. Editing /tmp/entities to replace any domain information

   Remove the domain specific file shares from the entity files.

3. samba-tool gpo restore backup_for_test /tmp/policy/{2F840485-D0DE-4201-A1AB-F49557E52C15} --entities /tmp/entities

   We do the restore and backup again so that binary inconsistencies can be ironed out.

   This is quite clearly the case with the Registry.pol file where Windows cannot seem to decide how to null-terminated strings.

4. samba-tool gpo backup {1E1DC8EA-390C-4800-B327-98B56A0AEA5D} --generalize

   Export the GPO again in a more canonicalized form.