Package: login
Version: 1:4.0.18.1-7
Severity: wishlist
Tags: patch

I'm sending a small patch to improve logging of login.  When getpwnam() fails 
inside the PAM section, login
would just silently quit, which caused me a considerable amount of pain while 
debugging my setup.  I thought,
I'd help avoid others falling into that trap in the future.

Kind regards,

Thiemo


--- login.c-orig        2007-11-16 15:23:59.000000000 +0100
+++ login.c     2007-11-16 15:32:17.000000000 +0100
@@ -745,10 +745,18 @@
                        PAM_FAIL_CHECK;
                }

-               if (!pwd || setup_groups (pwd))
+               if (!pwd) {
+                       SYSLOG ((LOG_ERR, "getpwnam(%s) failed", pam_user));
                        exit (1);
-               else
-                       pwent = *pwd;
+               }
+
+               if (setup_groups (pwd)) {
+                       SYSLOG ((LOG_ERR, "setup_groups() failed for user %s",
+                                pam_user));
+                       exit (1);
+               }
+
+               pwent = *pwd;

                retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
                PAM_FAIL_CHECK;



-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages login depends on:
ii  libc6                  2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii  libpam-modules         0.79-4            Pluggable Authentication Modules f
ii  libpam-runtime         0.79-4            Runtime support for the PAM librar
ii  libpam0g               0.79-4            Pluggable Authentication Modules l

login recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to