[Da-tools-commits] ./debian/userdir-ldap r488: Do not call FinishConfirmSudopassword if we already decided to not commit this
Peter Palfrader
peter at palfrader.org
Mon Dec 8 10:40:26 UTC 2008
------------------------------------------------------------
revno: 488
committer: Peter Palfrader <peter at palfrader.org>
branch nick: userdir-ldap
timestamp: Mon 2008-12-08 11:40:26 +0100
message:
Do not call FinishConfirmSudopassword if we already decided to not commit this
change mail because of parse errors.
modified:
debian/changelog
ud-mailgate
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-12-02 22:43:51 +0000
+++ b/debian/changelog 2008-12-08 10:40:26 +0000
@@ -1,12 +1,14 @@
-userdir-ldap (0.3.XX) unstable; urgency=low
+userdir-ldap (0.3.53) unstable; urgency=low
* Properly show shadowlastchange and mail disabled message when
locking an account, but not disabling email. It was written to
ldap correctly, but we updated the data to display wrongly.
* Fix formatting of PGP fingerprints - the double space was always
one element too early.
+ * Do not call FinishConfirmSudopassword if we already decided to
+ not commit this change mail because of parse errors.
- -- Peter Palfrader <weasel at debian.org> Tue, 02 Dec 2008 23:43:27 +0100
+ -- Peter Palfrader <weasel at debian.org> Mon, 08 Dec 2008 11:39:54 +0100
userdir-ldap (0.3.52) unstable; urgency=low
=== modified file 'ud-mailgate'
--- a/ud-mailgate 2008-11-14 19:41:43 +0000
+++ b/ud-mailgate 2008-12-08 10:40:26 +0000
@@ -565,15 +565,18 @@
if ((GetAttr(oldAttrs[0],"userPassword").find("*LK*") != -1)
or GetAttr(oldAttrs[0],"userPassword").startswith("!")):
raise Error, "This account is locked";
- try:
- Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs)
- Result = Result + Res + "\n";
- except Error, e:
- CommitChanges = 0
- Result = Result + "FinishConfirmSudopassword raised an error (%s) - no changes committed\n"%(e);
+
+ if CommitChanges == 1: # only if we are still good to go
+ try:
+ Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs)
+ Result = Result + Res + "\n";
+ except Error, e:
+ CommitChanges = 0
+ Result = Result + "FinishConfirmSudopassword raised an error (%s) - no changes committed\n"%(e);
+
# Modify the record
- Dn = "uid=" + GetAttr(DnRecord,"uid") + "," + BaseDn;
if CommitChanges == 1:
+ Dn = "uid=" + GetAttr(DnRecord,"uid") + "," + BaseDn;
l.modify_s(Dn,Attrs);
Attribs = "";
@@ -582,7 +585,7 @@
if len(Attrs) == 0:
raise Error, "User not found"
Attribs = GPGEncrypt(PrettyShow(Attrs[0])+"\n","0x"+Key[1],Key[4]);
-
+
Subst = {};
Subst["__FROM__"] = ChangeFrom;
Subst["__EMAIL__"] = EmailAddress(DnRecord);
@@ -792,4 +795,7 @@
if ErrType != EX_PERMFAIL:
sys.exit(ErrType);
sys.exit(0);
-
+
+# vim:set et:
+# vim:set ts=3:
+# vim:set shiftwidth=3:
More information about the Da-tools-commits
mailing list