s4:join python code - write the SAM account name correctly
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 8 Jan 2012 15:41:54 +0000 (16:41 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Feb 2012 23:27:08 +0000 (00:27 +0100)
It is easier for the comprehension

Reviewed-By: Andrew Bartlett <abartlet@samba.org>
source4/scripting/python/samba/join.py

index dc2ceef3390f39b5b8284c1c9fea95c05eacc5c4..5f8a107a37ead97bd1b22d7dd90385191a1cf1b1 100644 (file)
@@ -147,12 +147,12 @@ class dc_join(object):
         '''remove any DNs from a previous join'''
         try:
             # find the krbtgt link
-            print("checking samaccountname")
+            print("checking sAMAccountName")
             if ctx.subdomain:
                 res = None
             else:
                 res = ctx.samdb.search(base=ctx.samdb.get_default_basedn(),
-                                       expression='samAccountName=%s' % ldb.binary_encode(ctx.samname),
+                                       expression='sAMAccountName=%s' % ldb.binary_encode(ctx.samname),
                                        attrs=["msDS-krbTgtLink"])
                 if res:
                     ctx.del_noerror(res[0].dn, recursive=True)