netcmd: domain backup didn't support prompting for password
commit14077b6682d7dc1b16e1ccb42ef61e9f4c0a1715
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 9 Aug 2018 03:30:55 +0000 (9 15:30 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Aug 2018 05:08:25 +0000 (15 07:08 +0200)
treee0ded0d5649744eb4ad711eeea6d0fdf3c4cbbff
parent1da4ff2e64469dc8494ba895453d60206f030db4
netcmd: domain backup didn't support prompting for password

The online/rename backups only worked if you specified both the username
and password in the actual command itself. If you just entered the
username (expecting to be prompted for the password later), then the
command was rejected.

The problem was the order the code was doing things in. We were checking
credopts.creds.get_password() *before* we'd called
credopts.get_credentials(lp), whereas it should be the other way
around.

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

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