X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=b40be70d2488ba3469e05cba69cc1b5c3d24116d;hb=981acfe5633884cc137de3127df20bd043bca0c3;hp=49b26aeaed3d661797922af57b67d07c5d7942e3;hpb=28c3209e235e0d637172a1c5acd1e4142a58f8da;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 49b26ae..b40be70 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -484,7 +484,7 @@ def DoConfirmSudopassword(Str, SudoPasswd): return "got confirm for sudo password %s on host(s) %s, auth code %s" % (uuid, hosts, hmac) -def FinishConfirmSudopassword(l, uid, Attrs, SudoPasswd): +def FinishConfirmSudopassword(lc, uid, Attrs, SudoPasswd): result = "\n" if len(SudoPasswd) == 0: @@ -553,7 +553,7 @@ def connect_to_ldap_and_check_if_locked(DnRecord): if (GetAttr(Attrs[0], "userPassword").find("*LK*") != -1) \ or GetAttr(Attrs[0], "userPassword").startswith("!"): raise UDNotAllowedError("This account is locked") - return l + return lc # Handle an [almost] arbitary change @@ -599,7 +599,7 @@ def HandleChange(Reply, DnRecord, Key): if CommitChanges == 1 and len(SudoPasswd) > 0: # only if we are still good to go try: - Res = FinishConfirmSudopassword(l, GetAttr(DnRecord, "uid"), Attrs, SudoPasswd) + Res = FinishConfirmSudopassword(lc, GetAttr(DnRecord, "uid"), Attrs, SudoPasswd) if Res is not None: Result += Res + "\n" except Error, e: