Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:ALP:Source:Standard:Core:0.1
shadow
shadow-fix-print-login-timeout.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File shadow-fix-print-login-timeout.patch of Package shadow
From 670cae834827a8f794e6f7464fa57790d911b63c Mon Sep 17 00:00:00 2001 From: SoumyaWind <121475834+SoumyaWind@users.noreply.github.com> Date: Tue, 27 Dec 2022 17:40:17 +0530 Subject: [PATCH] shadow: Fix can not print full login timeout message Login timed out message prints only first few bytes when write is immediately followed by exit. Calling exit from new handler provides enough time to display full message. --- src/login.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/login.c b/src/login.c index 116e2cb36..c55f4de0a 100644 --- a/src/login.c +++ b/src/login.c @@ -120,6 +120,7 @@ static void get_pam_user (char **ptr_pam_user); static void init_env (void); static void alarm_handler (int); +static void exit_handler (int); /* * usage - print login command usage and exit @@ -391,11 +392,16 @@ static void init_env (void) #endif /* !USE_PAM */ } +static void exit_handler (unused int sig) +{ + _exit (0); +} static void alarm_handler (unused int sig) { write (STDERR_FILENO, tmsg, strlen (tmsg)); - _exit (0); + signal(SIGALRM, exit_handler); + alarm(2); } #ifdef USE_PAM
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor