nss-pam-ldapd branch master updated. 0.9.5-1-g530cc24
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd branch master updated. 0.9.5-1-g530cc24
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd branch master updated. 0.9.5-1-g530cc24
- Date: Thu, 16 Apr 2015 00:01:37 +0200 (CEST)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".
The branch, master has been updated
via 530cc24c83dd5d2d347acb40d64c3ae06a43a293 (commit)
from 16fd8c615153eb8851c009b6b7cc6f836baf6620 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=530cc24c83dd5d2d347acb40d64c3ae06a43a293
commit 530cc24c83dd5d2d347acb40d64c3ae06a43a293
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Wed Apr 15 23:55:14 2015 +0200
Avoid signal race condition on start-up
This only restores the signal mask after signal handlers are in place
and the daemon has completely daemonised to avoid a race condition in
the start-up phase of nslcd where a signal could be sent to nslcd
causing it to quit or fail to write information to the parent process.
diff --git a/nslcd/daemonize.c b/nslcd/daemonize.c
index 60f2d91..d11d358 100644
--- a/nslcd/daemonize.c
+++ b/nslcd/daemonize.c
@@ -89,7 +89,7 @@ static int read_response(int fd, char *buffer, size_t bufsz)
return r;
}
-/* ihe process calling daemonize_daemon() will end up here on success */
+/* The parent process calling daemonize_daemon() will end up here on success */
static int wait_for_response(int fd)
{
int i, l, rc;
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index f765b9c..469793a 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -838,8 +838,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
- /* install signalhandlers for some signals */
+ /* install signal handlers for some signals */
install_sighandler(SIGHUP, sig_handler);
install_sighandler(SIGINT, sig_handler);
install_sighandler(SIGQUIT, sig_handler);
@@ -850,6 +849,8 @@ int main(int argc, char *argv[])
install_sighandler(SIGUSR2, SIG_IGN);
/* signal the starting process to exit because we can provide services now */
daemonize_ready(EXIT_SUCCESS, NULL);
+ /* enable receiving of signals */
+ pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
/* wait until we received a signal */
while ((nslcd_receivedsignal == 0) || (nslcd_receivedsignal == SIGUSR1))
{
-----------------------------------------------------------------------
Summary of changes:
nslcd/daemonize.c | 2 +-
nslcd/nslcd.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
nss-pam-ldapd
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd branch master updated. 0.9.5-1-g530cc24,
Commits of the nss-pam-ldapd project