]> 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)
committerJule Anger <janger@samba.org>
Thu, 17 Apr 2025 11:16:13 +0000 (11:16 +0000)
commitf3b9da3179e87f3c7ddbc01b83cf1fceb1f2fa1c
treeb654a2792e0dafc9e06bf146384ff194d86486e6
parent0b7151d073d1b0a6076562e7052be64c8e9944b7
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>
(cherry picked from commit 6107656ebc8d092b2c1907940b2486ab0265aad9)
python/samba/netcmd/gpo.py