]> git.ipfire.org Git - thirdparty/samba.git/commit
samba-tool gpo: better entities check copes with new lines
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 14 Mar 2025 04:45:18 +0000 (17:45 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 25 Mar 2025 04:20:45 +0000 (04:20 +0000)
commit6107656ebc8d092b2c1907940b2486ab0265aad9
tree61d49912ee5c186987759c46c8e03035ac65b2fc
parent65751f2562f98bd7fd0734dc00784e6395d76322
samba-tool gpo: better entities check copes with new lines

Per https://www.w3.org/TR/xml/#sec-entity-decl (and MS references)
there is always some whitespace between '<!ENTITY' and the name, and
between the name and whatever is next. Also, it is valid XML to have
newlines inside entity declarations, like this:

<!ENTITY
    bubble
      "*S-1-5-113"
      >

We used to create such files, so we should allow them.

There is a kind of entity that has '%' before the name, and there are
non-ascii names, which we continue not to support.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
python/samba/netcmd/gpo.py