samba-tool gpo: improve UNC parsing
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 16 Jan 2020 01:12:02 +0000 (14:12 +1300)
committerJeremy Allison <jra@samba.org>
Thu, 16 Jan 2020 20:09:42 +0000 (20:09 +0000)
commit4bc481c5cb7d772f473171949a3d522788bb7dcf
treef0b5c9f87df0bd9c82e8d99f9d697fa2d6787f2f
parentebced94a8721ffd25386bda452a1857fa92b9899
samba-tool gpo: improve UNC parsing

The "UNC doesn't start with \\\\ or //" message was unreachable due to
a logic error, and an UNC starting with \\ would have been split on
/ if there were enough /s in the string.

The unreachable exception was first noticed by Gerhard Lausser in a
github pull request (https://github.com/samba-team/samba/pull/123),
but that patch no longer applies with this more thorough rewrite.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/netcmd/gpo.py