ud-mailage: allow dashes in hostnames.
authorPeter Palfrader <peter@palfrader.org>
Sun, 21 Sep 2014 12:51:19 +0000 (14:51 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 21 Sep 2014 12:51:19 +0000 (14:51 +0200)
debian/changelog
ud-mailgate

index a629bcb..38d8aa4 100644 (file)
@@ -6,14 +6,16 @@ userdir-ldap (0.3.83) UNRELEASED; urgency=low
     + notification is now the default
 
   [ Peter Palfrader ]
-  * ud-mailgate: fix sudopassword confirm handling.
+  * ud-mailgate:
+    - fix sudopassword confirm handling.
+    - allow dashes in hostnames.
   * ud-generate: update gitolite authkeys generation
     - skip ssh keys with non-local allowed_hosts
     - skip all keys with other restrictions
     - make including keys for hosts optional (on by default)
     - support overriding the command we restrict to
 
- -- Peter Palfrader <weasel@debian.org>  Fri, 19 Sep 2014 21:23:32 +0200
+ -- Peter Palfrader <weasel@debian.org>  Sun, 21 Sep 2014 14:50:59 +0200
 
 userdir-ldap (0.3.82) unstable; urgency=low
 
index 05756aa..6f9b20c 100755 (executable)
@@ -490,7 +490,7 @@ def DoRBL(Str,Attrs):
 
 # Handle a ConfirmSudoPassword request
 def DoConfirmSudopassword(Str, SudoPasswd):
-   Match = re.compile('^confirm sudopassword ('+UUID_FORMAT+') ([a-z0-9.,*]+) ([0-9a-f]{40})$').match(Str)
+   Match = re.compile('^confirm sudopassword ('+UUID_FORMAT+') ([a-z0-9.,*-]+) ([0-9a-f]{40})$').match(Str)
    if Match == None:
       return None
 
@@ -517,7 +517,7 @@ def FinishConfirmSudopassword(l, uid, Attrs, SudoPasswd):
 
    newldap = []
    for entry in inldap:
-      Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*]+) ([^ ]+)$').match(entry)
+      Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*-]+) ([^ ]+)$').match(entry)
       if Match == None:
          raise UDFormatError, "Could not parse existing sudopasswd entry"
       uuid = Match.group(1)