X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=6e24f10d0108c165c31c76071a9f84fd973dded6;hb=162b1cc123ef36b78070248e133d35ba6968a2a8;hp=2d8ce8c6e759a21af6b0c784ae773d9d8ac4e282;hpb=ffb5075282c0cf4602a070b0fb593371c0783fcb;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 2d8ce8c..6e24f10 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -344,8 +344,8 @@ def HandleChange(Reply,DnRecord,Key): # Modify the record l.simple_bind_s("uid="+AccessPass[0]+","+BaseDn,AccessPass[1]); oldAttrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid="+GetAttr(DnRecord,"uid")); - if (string.find(GetAttr(oldAttrs[0],"userPassword"),"*LK*") != -1) \ - or GetAttr(x,"userPassword").startswith("!"): + if ((string.find(GetAttr(oldAttrs[0],"userPassword"),"*LK*") != -1) + or GetAttr(oldAttrs[0],"userPassword").startswith("!")): raise Error, "This account is locked"; Dn = "uid=" + GetAttr(DnRecord,"uid") + "," + BaseDn; l.modify_s(Dn,Attrs);