ud-useradd: Only ask for private subscription if this installation has a debian-priva...
authorPeter Palfrader <peter@palfrader.org>
Fri, 8 Jan 2010 23:27:37 +0000 (00:27 +0100)
committerPeter Palfrader <peter@palfrader.org>
Fri, 8 Jan 2010 23:27:37 +0000 (00:27 +0100)
debian/changelog
ud-useradd
userdir-ldap.conf

index 92fadd2..b111ef7 100644 (file)
@@ -8,8 +8,11 @@ userdir-ldap (0.3.76xXx) unstable; urgency=low
   * ud-useradd: Fix usergroup support:
     - Move ldap call to actually add the user to the right place,
     - Properly compare strings and numbers.
+  * ud-useradd: Only ask for private subscription if this installation
+    has a debian-private like mailinglist whose membership is configured
+    by ud-ldap.  (defaults to true.)
 
- -- Peter Palfrader <weasel@debian.org>  Sat, 09 Jan 2010 00:19:44 +0100
+ -- Peter Palfrader <weasel@debian.org>  Sat, 09 Jan 2010 00:27:02 +0100
 
 userdir-ldap (0.3.75) unstable; urgency=low
 
index 52689b3..243443f 100755 (executable)
@@ -25,6 +25,8 @@ import email.Header
 from userdir_ldap import *;
 from userdir_gpg import *;
 
+HavePrivateList = getattr(ConfModule, "haveprivatelist", True)
+
 # This tries to search for a free UID. There are two possible ways to do
 # this, one is to fetch all the entires and pick the highest, the other
 # is to randomly guess uids until one is free. This uses the former.
@@ -167,9 +169,12 @@ if Res != "":
    emailaddr = Res;
 
 # Debian-Private subscription
-Res = raw_input("Subscribe to debian-private (space is none) [" + privsub + "]? ");
-if Res != "":
-   privsub = Res;
+if HavePrivateList:
+   Res = raw_input("Subscribe to debian-private (space is none) [" + privsub + "]? ");
+   if Res != "":
+      privsub = Res;
+else:
+   privsub = " "
 
 (uidNumber, generatedGID) = GetFreeID(l)
 if not gidNumber:
@@ -226,7 +231,8 @@ print "Final information collected:"
 print " %s <%s@%s>:" % (FullName,account,EmailAppend);
 print "   Assigned UID:",uidNumber," GID:", gidNumber;
 print "   Email forwarded to:",emailaddr
-print "   Private Subscription:",privsub;
+if HavePrivateList:
+   print "   Private Subscription:",privsub;
 print "   GECOS Field: \"%s,,,,\"" % (FullName);
 print "   Login Shell: /bin/bash";
 print "   Key Fingerprint:",Keys[0][1];
index cb4a5cb..78a2fee 100644 (file)
@@ -30,6 +30,9 @@ replaycachefile = "/var/cache/userdir-ldap/mail/replay";
 #replaycachefile = "/tmp/replay";
 fingerprintfile = "/etc/userdir-ldap/badfingerprints"
 
+# do we have a debian-private like list that we should ask about in ud-useradd
+haveprivatelist = True;
+
 # Echelon
 ech_errorlog = "/org/db.debian.org/mail/Log/ech-errors.log"
 ech_mainlog = "/org/db.debian.org/mail/Log/ech.log"