Bug 26015

Summary: greeter logs garbage to syslog in case of failed login attempt
Product: xorg Reporter: Dmitry V. Levin <ldv>
Component: App/xdmAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: patch
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xdm-greeter-fix-logging-of-failed-login-attempts.patch none

Description Dmitry V. Levin 2010-01-12 13:19:16 UTC
When PAM rejects a login attempt, greeter logs to syslog some garbage instead of login name.
Comment 1 Dmitry V. Levin 2010-01-12 13:21:48 UTC
Created attachment 32597 [details] [review]
xdm-greeter-fix-logging-of-failed-login-attempts.patch

Proposed fix.
Comment 2 Alan Coopersmith 2010-01-12 13:31:51 UTC
Pushed to master - thanks for the fix.   (I had noticed that and had started
to fix, but never gotten around to finishing it.)

 greeter/greet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 504bb1aee60d570d8676a61acbe32c66d6069c45
Author: Dmitry V. Levin <ldv@altlinux.org>
Date:   Tue Jan 12 14:38:33 2010 +0000

    greeter: fix logging of failed login attempts
    
    When PAM rejects a login attempt, the "username" variable remains
    uninitialized, which results to garbage being syslogged instead of
    login name.  Explicit initialization helps to avoid this issue.
    
    Fixes FreeDesktop Bug #26015 <https://bugs.freedesktop.org/show_bug.cgi?id=26015>
    
    Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.