ud-info: fix changing of DD status/DD status comment - we were missing prompt informa...
authorPeter Palfrader <peter@palfrader.org>
Tue, 8 Jul 2008 07:44:46 +0000 (09:44 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 8 Jul 2008 07:44:46 +0000 (09:44 +0200)
ud-info: Warn when we don't have a prompt string for attributes on startup.

debian/changelog
ud-info
userdir_gpg.py

index 46c05b4..b825cec 100644 (file)
@@ -1,3 +1,12 @@
+userdir-ldap (0.3.XX) unstable; urgency=low
+
+  * ud-info: fix changing of DD status/DD status comment -
+    we were missing prompt information so we got a backtrace.
+  * ud-info: Warn when we don't have a prompt string for
+    attributes on startup.
+
+ -- Peter Palfrader <weasel@debian.org>  Tue, 08 Jul 2008 09:44:39 +0200
+
 userdir-ldap (0.3.33) unstable; urgency=low
 
   * add "security simple_bind=128" to sample slapd.conf.
 userdir-ldap (0.3.33) unstable; urgency=low
 
   * add "security simple_bind=128" to sample slapd.conf.
diff --git a/ud-info b/ud-info
index 795584b..a94ff91 100755 (executable)
--- a/ud-info
+++ b/ud-info
@@ -116,7 +116,10 @@ AttrPrompt = {"cn": ["Common name or first name"],
               "labeledURI": ["Web home page"],
               "jabberJID": ["Jabber ID"],
               "icqUin": ["ICQ UIN Number"],
               "labeledURI": ["Web home page"],
               "jabberJID": ["Jabber ID"],
               "icqUin": ["ICQ UIN Number"],
-              "VoIP": ["VoIP Address"]};
+              "VoIP": ["VoIP Address"],
+              "accountStatus": ["DD status"],
+              "accountComment": ["DD status comment"],
+              };
 
 # Create a map of IDs to desc,value,attr
 OrderedIndex = {};
 
 # Create a map of IDs to desc,value,attr
 OrderedIndex = {};
@@ -125,6 +128,10 @@ for at in AttrInfo.keys():
       OrderedIndex[AttrInfo[at][1]] = [AttrInfo[at][0], "", at];
 OrigOrderedIndex = copy.deepcopy(OrderedIndex);
 
       OrderedIndex[AttrInfo[at][1]] = [AttrInfo[at][0], "", at];
 OrigOrderedIndex = copy.deepcopy(OrderedIndex);
 
+for id in OrderedIndex:
+   if not AttrPrompt.has_key( OrderedIndex[id][2] ):
+      print "Warning: no AttrPrompt for %s"%(id)
+
 # Show shadow information
 def PrintShadow(Attrs):
    Changed = int(GetAttr(Attrs,"shadowLastChange","0"));
 # Show shadow information
 def PrintShadow(Attrs):
    Changed = int(GetAttr(Attrs,"shadowLastChange","0"));
index 9b497b2..273ac47 100644 (file)
@@ -368,10 +368,15 @@ def GPGCheckSig(Message):
             Why = "Unable to verify signature, signing key missing.";
 
         # Expired signature
             Why = "Unable to verify signature, signing key missing.";
 
         # Expired signature
-        if Split[1] == "SIGEXPIRED" or Split[1] == "EXPSIG":
+        if Split[1] == "EXPSIG":
            GoodSig = 0;
             Why = "Signature has expired";
            GoodSig = 0;
             Why = "Signature has expired";
-           
+
+        # Expired signature
+        if Split[1] == "EXPKEYSIG":
+           GoodSig = 0;
+            Why = "Signing key (%s, %s) has expired"%(Split[2], Split[3]);
+
         # Revoked key
         if Split[1] == "KEYREVOKED" or Split[1] == "REVKEYSIG":
            GoodSig = 0;
         # Revoked key
         if Split[1] == "KEYREVOKED" or Split[1] == "REVKEYSIG":
            GoodSig = 0;