s4:getopt.py - set the password callback only when no password has been provided
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Feb 2010 12:55:14 +0000 (13:55 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Feb 2010 14:04:07 +0000 (15:04 +0100)
commitde555895e59ffa691b5c8e910fe0d93cacc9281e
treecb66d3437551eff9a78faf524dfb745d6f1faa11
parente82ac8655e95e9df818d8b74c79c06f090a01d70
s4:getopt.py - set the password callback only when no password has been provided

Previously the "no_pass" and "no_pass2" variables weren't handled correctly.
Since at the initialisation of the "CredentialsOptions" we don't have any
password at all. Only afterwards we could get one through "set_password".

If a password is specified, use it. If no password is specified, consider the
use fo an input mask on STDOUT. But if the loadparm context contains one prefer
it over the input.
source4/scripting/python/samba/getopt.py