UUID_FORMAT = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
-EmailCheck = re.compile("^([^ <>@]+@[^ ,<>@]+)?$")
+EmailCheck = re.compile("^([^ <>@]+@[^ ,<>@]+)(,\s*([^ <>@]+@[^ ,<>@]+))*$")
BSMTPCheck = re.compile(".*mx 0 (master)\.debian\.org\..*",re.DOTALL)
PurposeHostField = re.compile(r".*\[\[([\*\-]?[a-z0-9.\-]*)(?:\|.*)?\]\]")
IsV6Addr = re.compile("^[a-fA-F0-9:]+$")
supgroups=[]
addGroups(supgroups, account['supplementaryGid'], account['uid'], current_host)
for g in supgroups:
- if allowed.has_key(g):
+ if g in allowed:
return True
return False
continue
generate_host(host, global_dir, accounts, ssh_userkeys)
-def generate_host(host, global_dir, accounts, ssh_userkeys):
+def generate_host(host, global_dir, all_accounts, ssh_userkeys):
current_host = host[1]['hostname'][0]
OutDir = global_dir + current_host + '/'
if not os.path.isdir(OutDir):
ExtraList[extra.upper()] = True
if GroupList != {}:
- accounts = filter(lambda x: IsInGroup(x, GroupList, current_host), accounts)
+ accounts = filter(lambda x: IsInGroup(x, GroupList, current_host), all_accounts)
DoLink(global_dir, OutDir, "debianhosts")
DoLink(global_dir, OutDir, "ssh_known_hosts")