s4/ldapcmp: Correct fix for creds2
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Wed, 5 Jan 2011 14:16:59 +0000 (16:16 +0200)
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Wed, 5 Jan 2011 14:16:59 +0000 (16:16 +0200)
We need to set domain and workstation to creds2 otherwise we get Segfault
because they are not initialized correctly.

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

index 1318457a80aad0ac2ac64e600cbcde341cd4798d..7816fce4d8a2811b8003a25408ef25f091acb86f 100755 (executable)
@@ -774,6 +774,9 @@ class cmd_ldapcmp(Command):
         creds2 = credopts.get_credentials2(lp, False)
         if creds2.is_anonymous():
             creds2 = creds
+        else:
+            creds2.set_domain("")
+            creds2.set_workstation("")
         if not creds.authentication_requested():
             raise CommandError("You must supply at least one username/password pair")