gpo: Make restore with entities more robust
commitcedfea1b077a7cb068d884e17f2d9c22e7e97cd5
authorGarming Sam <garming@catalyst.net.nz>
Tue, 12 Jun 2018 04:19:41 +0000 (12 16:19 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 16 Aug 2018 21:42:22 +0000 (16 23:42 +0200)
treeacc1c709995c08ab03109cce9d7360b064898a1b
parent9977b4bc7c3fa7ef93f4f42fcc707d9b2d84f9cb
gpo: Make restore with entities more robust

Sometimes the restore fails for unknown reasons, but rearranging the XML
such that the DTD is after the xml header appears to fix it. This might
be the case in certain files where no entities are used perhaps.

This could probably be made more tolerant using regex, but for the most
part we expect the fixed output from the minidom pretty-printed XML.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/gpo.py