ud-generate: deal with users without loginShell fordsa salsa
authorJulien Cristau <jcristau@debian.org>
Tue, 19 Nov 2019 21:50:09 +0000 (22:50 +0100)
committerJulien Cristau <jcristau@debian.org>
Tue, 19 Nov 2019 21:50:09 +0000 (22:50 +0100)
debian/changelog
ud-generate

index 1ea927e..bdf0c40 100644 (file)
@@ -28,6 +28,7 @@ userdir-ldap (0.3.97) UNRELEASED; urgency=medium
   * ud-host: use subprocess.Popen instead of os.popen.
   * Use ldap.initialize instead of ldap.open for compatibility with python-ldap 3.2.0.
   * ud-fingerserv: fix logging when using ipv6 and inetd
+  * ud-generate: deal with users without loginShell
 
  -- Peter Palfrader <weasel@debian.org>  Sat, 06 Apr 2019 22:04:34 +0200
 
index eb38748..db6770d 100755 (executable)
@@ -215,6 +215,8 @@ def GenPasswd(accounts, File, HomePrefix, PwdMarker):
       userlist = {}
       i = 0
       for a in accounts:
+         if 'loginShell' not in a:
+             continue
          # Do not let people try to buffer overflow some busted passwd parser.
          if len(a['gecos']) > 100 or len(a['loginShell']) > 50: continue