s4/ldapcmp: Check if creds2 is actualy set by the command line
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Tue, 4 Jan 2011 15:45:16 +0000 (17:45 +0200)
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Tue, 4 Jan 2011 17:11:26 +0000 (18:11 +0100)
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

source4/scripting/python/samba/netcmd/ldapcmp.py

index 1ecbda73a9ba46a57761b2205fd8526f241604d7..76f7d957564491bcf00f74840b9c133b2f220ed9 100755 (executable)
@@ -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")