X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=ud-generate;h=1782f096b9eb93c75008b4799f53d11cbe93b22b;hb=14908ffbe8886fdd85bf143ef14200e0171c18cd;hp=48520038ec0fc5e99a338ec3f3b84efa175e16a5;hpb=bfd6f5c83238290a5920219af7329fb85af86a0b;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index 4852003..1782f09 100755 --- a/ud-generate +++ b/ud-generate @@ -223,14 +223,15 @@ def GenShadowSudo(l,File): Pass = None for entry in x[1]['sudoPassword']: - Match = re.compile('^('+UUID_FORMAT+') (confirmed|unconfirmed) ([a-z0-9.,*]+) ([^ ]+)$').match(entry.lower()) + Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*]+) ([^ ]+)$').match(entry.lower()) if Match == None: continue + uuid = Match.group(1) status = Match.group(2) hosts = Match.group(3) cryptedpass = Match.group(4) - if status != 'confirmed': + if status != 'confirmed:'+make_sudopasswd_hmac('password-is-confirmed', uuid, hosts, cryptedpass): continue for_all = hosts == "*" for_this_host = CurrentHost in hosts.split(',')