Author: Arthur de Jong <adejong@debian.org>
Last-Update: 2013-08-14
Forwarded: <unknown>. Fixed in 1.3.6rc1
Bug-Debian: http://bugs.debian.org/717235
Description: not request the whole passwd DB at each login.

Index: proftpd-dfsg/modules/mod_auth.c
===================================================================
--- proftpd-dfsg.orig/modules/mod_auth.c
+++ proftpd-dfsg/modules/mod_auth.c
@@ -883,16 +883,23 @@ static struct passwd *passwd_dup(pool *p
 }
 
 static void ensure_open_passwd(pool *p) {
-  /* Make sure pass/group is open.
-   */
+  /* Make sure pass/group is open. */
   pr_auth_setpwent(p);
   pr_auth_setgrent(p);
 
   /* On some unices the following is necessary to ensure the files
-   * are open.  (BSDI 3.1)
+   * are open (BSDI 3.1)
    */
   pr_auth_getpwent(p);
   pr_auth_getgrent(p);
+
+  /* Per Debian bug report:
+   *   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717235
+   * we might want to do another set{pw,gr}ent(), to play better with
+   * some NSS modules.
+   */
+  pr_auth_setpwent(p);
+  pr_auth_setgrent(p);
 }
 
 /* Next function (the biggie) handles all authentication, setting
