Package: falselogin
Version: 0.2-4
Severity: important
Tags: patch

On a machine using LDAP authentication, falselogin segfaults for some
users.  I managed to track down the reason.  This patch solve it, by
making sure to not reference the NULL pointer when getpwent() return
NULL.

--- falselogin-0.3.orig/falselogin.c
+++ falselogin-0.3/falselogin.c
@@ -58,7 +58,7 @@
        // (it might be a better way)
        while (!ok) {
                pwd = getpwent ();
-               if (pwd->pw_uid == getuid ())
+               if (pwd && pwd->pw_uid == getuid ())
                        ok = 1;
        }




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

Reply via email to