From: Stephen Gran Date: Sun, 31 May 2009 13:30:06 +0000 (+0000) Subject: 3 changes: X-Git-Tag: userdir-ldap-0.3.67~10 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=c555044ceb3eb8141735926c41a5b87906cfdd42;hp=c18ac1149b9051374d362dd6aea52485dc31a997;p=mirror%2Fuserdir-ldap.git 3 changes: DisabledUsers should only be set for accounts that are locked, not all accounts IsGidDebian is not a helpful check right now The filter needs to be a lambda operator --- diff --git a/ud-generate b/ud-generate index 18e4c6e..b8a21f1 100755 --- a/ud-generate +++ b/ud-generate @@ -619,11 +619,11 @@ def GenDisabledAccounts(File): if Pass.find("*LK*") != -1 or Pass.startswith("!"): # Format is : Line = "%s:%s" % (GetAttr(x, "uid"), "Account is locked") + DisabledUsers.append(x) if Line != "": F.write(Sanitize(Line) + "\n") - DisabledUsers.append(x) # Oops, something unspeakable happened. except: @@ -1045,8 +1045,9 @@ else: GlobalDir = GenerateDir + "/" GenDisabledAccounts(GlobalDir + "disabled-accounts") -PasswdAttrs = filter(not IsRetired, PasswdAttrs) -DebianUsers = filter(IsGidDebian, PasswdAttrs) +PasswdAttrs = filter(lambda x: not IsRetired(x), PasswdAttrs) +#DebianUsers = filter(lambda x: IsGidDebian(x), PasswdAttrs) +DebianUsers = PasswdAttrs CheckForward()