1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s4: Simplify two lines in the "samdb.py" file (cosmetic)

This commit is contained in:
Matthias Dieter Wallnöfer
2009-08-06 11:38:06 +02:00
parent 1ce36ed747
commit 915b789c87

View File

@ -81,8 +81,7 @@ description: %s
"""
res = self.search(user_dn, ldb.SCOPE_BASE, None, ["userAccountControl"])
assert len(res) == 1
userAccountControl = res[0]["userAccountControl"][0]
userAccountControl = int(userAccountControl)
userAccountControl = int(res[0]["userAccountControl"][0])
if (userAccountControl & 0x2):
userAccountControl = userAccountControl & ~0x2 # remove disabled bit
if (userAccountControl & 0x20):