summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2011-01-04 17:45:16 +0200
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2011-01-04 18:11:26 +0100
commitf8275bae5d7b471967be7222170d049c18b8882f (patch)
tree732281cfd87461e7ba40afee89b6fc25dbcfa9de /source4
parente1e869352565b8e1d7865a2338f8f0f3ef154519 (diff)
downloadsamba-f8275bae5d7b471967be7222170d049c18b8882f.tar.gz
samba-f8275bae5d7b471967be7222170d049c18b8882f.tar.bz2
samba-f8275bae5d7b471967be7222170d049c18b8882f.zip
s4/ldapcmp: Check if creds2 is actualy set by the command line
When parsing the command line for the second set of credentials the parser returns wrong user if the second set of parameters isn't set. So check if the password is set instead. Autobuild-User: Anatoliy Atanasov <anatoliy.atanasov@postpath.com> Autobuild-Date: Tue Jan 4 18:11:26 CET 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/python/samba/netcmd/ldapcmp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/ldapcmp.py b/source4/scripting/python/samba/netcmd/ldapcmp.py
index 1ecbda73a9..76f7d95756 100755
--- a/source4/scripting/python/samba/netcmd/ldapcmp.py
+++ b/source4/scripting/python/samba/netcmd/ldapcmp.py
@@ -772,7 +772,7 @@ class cmd_ldapcmp(Command):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
creds2 = credopts.get_credentials2(lp)
- if creds2.is_anonymous():
+ if credopts.no_pass2:
creds2 = creds
if not creds.authentication_requested():
raise CommandError("You must supply at least one username/password pair")