3 changes:
authorStephen Gran <steve@lobefin.net>
Sun, 31 May 2009 13:30:06 +0000 (13:30 +0000)
committercommitter steve@lobefin.net 1243776606 +0000 <committer steve@lobefin.net 1243776606 +0000>
Sun, 31 May 2009 13:30:06 +0000 (13:30 +0000)
  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

ud-generate

index 18e4c6e..b8a21f1 100755 (executable)
@@ -619,11 +619,11 @@ def GenDisabledAccounts(File):
          if Pass.find("*LK*") != -1 or Pass.startswith("!"):
             # Format is <login>:<reason>
             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()