[Da-tools-commits] ./da-tools/userdir-ldap-sshkeys r363: merge from upstream

Mark Hymers mark at hymers.org.uk
Wed Dec 26 22:47:43 UTC 2007


------------------------------------------------------------
revno: 363
committer: Mark Hymers <mark at hymers.org.uk>
branch nick: userdir-ldap-common-sshkeys
timestamp: Wed 2007-12-26 22:47:43 +0000
message:
  merge from upstream
modified:
  ud-generate
    ------------------------------------------------------------
    revno: 353.2.1
    committer: Marc 'HE' Brockschmidt <he at debian.org>
    branch nick: userdir-ldap-UIDShift+PasswordLessExport
    timestamp: Wed 2007-12-26 23:38:22 +0100
    message:
      Mark that no passwords are exported also in the generated passwd file, not
      only in the shadow file (by using a "*" as password (meaning "no password),
      instead of "x" (meaning "do I look like a passwd from the nineties? Look
      into /etc/shadow!")).
    modified:
      ud-generate
    ------------------------------------------------------------
    revno: 353.1.6.1.1
    committer: Marc 'HE' Brockschmidt <he at debian.org>
    branch nick: userdir-ldap-common
    timestamp: Wed 2007-12-26 23:41:38 +0100
    message:
      Merge passwordless export fix
    modified:
      ud-generate
    ------------------------------------------------------------
    revno: 353.1.7
    committer: Mark Hymers <mark at hymers.org.uk>
    branch nick: userdir-ldap-common
    timestamp: Wed 2007-12-26 22:47:26 +0000
    message:
      merge from upstream
    modified:
      ud-generate
-------------- next part --------------
=== modified file 'ud-generate'
--- a/ud-generate	2007-12-26 21:26:23 +0000
+++ b/ud-generate	2007-12-26 22:47:43 +0000
@@ -88,7 +88,7 @@
     os.rename(File + ".tdb.tmp",File+".tdb");
   
 # Generate the password list
-def GenPasswd(l,File,HomePrefix):
+def GenPasswd(l,File,HomePrefix,PwdMarker):
   F = None;
   try:
    F = open(File + ".tdb.tmp","w");
@@ -107,7 +107,8 @@
       if len(GetAttr(x,"gecos")) > 100 or len(GetAttr(x,"loginShell")) > 50:
          continue;
 
-      Line = "%s:x:%s:%s:%s:%s%s:%s" % (GetAttr(x,"uid"),\
+      Line = "%s:%s:%s:%s:%s:%s%s:%s" % (GetAttr(x,"uid"),\
+              PwdMarker,\
               GetAttr(x,"uidNumber"),GetAttr(x,"gidNumber"),\
               GetAttr(x,"gecos"),HomePrefix,GetAttr(x,"uid"),\
               GetAttr(x,"loginShell"));
@@ -884,7 +885,10 @@
    DoLink(GlobalDir,OutDir,"disabled-accounts")
 
    sys.stdout.flush();
-   GenPasswd(l,OutDir+"passwd",Split[1]);
+   if ExtraList.has_key("[NOPASSWD]"):
+      GenPasswd(l,OutDir+"passwd",Split[1], "*");
+   else:
+      GenPasswd(l,OutDir+"passwd",Split[1], "x");
    sys.stdout.flush();
    GenGroup(l,OutDir+"group");
    if ExtraList.has_key("[UNTRUSTED]"):



More information about the Da-tools-commits mailing list