From 3c0e8862b5743b1703e846fe5c6ffb9d91372e16 Mon Sep 17 00:00:00 2001 From: Dmitry V. Levin Date: Tue, 12 Jan 2010 14:38:33 +0000 Subject: [PATCH] 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 Signed-off-by: Dmitry V. Levin --- greeter/greet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/greeter/greet.c b/greeter/greet.c index 61c7a52..f4c972b 100644 --- a/greeter/greet.c +++ b/greeter/greet.c @@ -500,7 +500,7 @@ greet_user_rtn GreetUser( struct myconv_data pcd = { d, greet, NULL }; struct pam_conv pc = { pamconv, &pcd }; const char * pam_fname; - char * username; + char * username = NULL; const char * login_prompt; -- 1.6.5.7