From 3cd4b4094cb2c21072715b21fee4b988cc529215 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 21 Sep 2014 15:20:40 +0200 Subject: [PATCH] ud-generate: sudopassword: allow dashes in hostnames --- debian/changelog | 5 +++-- ud-generate | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 38d8aa4..c1c2c9d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,14 +8,15 @@ userdir-ldap (0.3.83) UNRELEASED; urgency=low [ Peter Palfrader ] * ud-mailgate: - fix sudopassword confirm handling. - - allow dashes in hostnames. + - sudopassword: 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 + - sudopassword: allow dashes in hostnames. - -- Peter Palfrader Sun, 21 Sep 2014 14:50:59 +0200 + -- Peter Palfrader Sun, 21 Sep 2014 15:20:05 +0200 userdir-ldap (0.3.82) unstable; urgency=low diff --git a/ud-generate b/ud-generate index 41350d0..4cd5d42 100755 --- a/ud-generate +++ b/ud-generate @@ -307,7 +307,7 @@ def GenShadowSudo(accounts, File, untrusted, current_host): Pass = '*' if 'sudoPassword' in a: for entry in a['sudoPassword']: - 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: continue uuid = Match.group(1) -- 2.20.1