Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:hlin
opensuse
openssh-4.1p1-blocksigalrm.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openssh-4.1p1-blocksigalrm.diff of Package opensuse
--- log.c 2004-06-25 01:36:25.689427240 -0700 +++ log.c.new 2004-06-25 01:37:12.642289320 -0700 @@ -272,6 +272,7 @@ char fmtbuf[MSGBUFSIZ]; char *txt = NULL; int pri = LOG_INFO; + sigset_t nset, oset; if (level > log_level) return; @@ -310,6 +311,15 @@ pri = LOG_ERR; break; } + /* Prevent a race between the grace_alarm + * which writes a log message and terminates + * and main sshd code that leads to deadlock + * as syslog is not async safe. + */ + sigemptyset(&nset); + sigaddset(&nset, SIGALRM); + sigprocmask(SIG_BLOCK, &nset, &oset); + if (txt != NULL) { snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", txt, fmt); vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args); @@ -330,5 +340,7 @@ syslog(pri, "%.500s", fmtbuf); closelog(); #endif + + sigprocmask(SIG_SETMASK, &oset, NULL); } }
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