netcmd: Refactor duplicated SMB connect in GPO commands
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 13 Dec 2018 21:47:45 +0000 (10:47 +1300)
committerTim Beale <timbeale@samba.org>
Mon, 7 Jan 2019 21:48:30 +0000 (22:48 +0100)
commit888c6080c5fed1a85374090f7389fc4cb9d36782
tree2cc9c34132e94b7260d9fc430fb3e77fc1d49423
parent5a6fcdd8feea3505407b5130174ff3547a88915d
netcmd: Refactor duplicated SMB connect in GPO commands

Do the SMB connection in a single helper function.

Note: this highlights that perhaps we want all SMB connections to be
signed, but we can fix that up separately.

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

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/netcmd/gpo.py