X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=4fa2edf0f1f3ee6f043d5be7bde8fb8b0a787946;hb=f27db3e7f5d3bb3fe0d36e1ab15e143ce45d269d;hp=4da438266d92e8eb1f84595317c04115836c21ae;hpb=33df1c27d9617c868e67b7c1cc92720310c2373d;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 4da4382..4fa2edf 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -239,6 +239,8 @@ def LoadBadSSH(): # [options] 1024 35 13188913666680[..] [comment] def DoSSH(Str, Attrs, badkeys, uid): Match = SSH2AuthSplit.match(Str); + if Match == None: + return None; g = Match.groups() typekey = g[1] if Match == None: @@ -549,7 +551,8 @@ def HandleChPass(Reply,DnRecord,Key): raise Error, "This account is locked"; # Modify the password - Rec = [(ldap.MOD_REPLACE,"userPassword","{crypt}"+Pass)]; + Rec = [(ldap.MOD_REPLACE,"userPassword","{crypt}"+Pass), + (ldap.MOD_REPLACE,"shadowLastChange",str(int(time.time()/24/60/60)))]; Dn = "uid=" + GetAttr(DnRecord,"uid") + "," + BaseDn; l.modify_s(Dn,Rec);