lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.4-8-g4262122

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.4-8-g4262122



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  42621223e13b843d8945ce2f7fcdc663bf351b77 (commit)
       via  1d3b19b1ecd3b10f36e8925e8a752a28e3e74b56 (commit)
      from  78627c97f9ff4a15e6b54f45877cf4459ac6db17 (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=42621223e13b843d8945ce2f7fcdc663bf351b77

commit 42621223e13b843d8945ce2f7fcdc663bf351b77
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Fri Oct 10 23:43:44 2014 +0200

    Fix format string
    
    Thanks Jianhai Luan.

diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index a0c67a6..2a12f68 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -782,19 +782,19 @@ int main(int argc, char *argv[])
       daemonize_ready(EXIT_FAILURE, "cannot setgid()\n");
       exit(EXIT_FAILURE);
     }
-    log_log(LOG_DEBUG, "setgid(%ul) done", (unsigned long int)nslcd_cfg->gid);
+    log_log(LOG_DEBUG, "setgid(%lu) done", (unsigned long int)nslcd_cfg->gid);
   }
   /* change to nslcd uid */
   if (nslcd_cfg->uid != NOUID)
   {
     if (setuid(nslcd_cfg->uid) != 0)
     {
-      log_log(LOG_ERR, "cannot setuid(%ul): %s",
+      log_log(LOG_ERR, "cannot setuid(%lu): %s",
               (unsigned long int)nslcd_cfg->uid, strerror(errno));
       daemonize_ready(EXIT_FAILURE, "cannot setuid()\n");
       exit(EXIT_FAILURE);
     }
-    log_log(LOG_DEBUG, "setuid(%ul) done", (unsigned long int)nslcd_cfg->uid);
+    log_log(LOG_DEBUG, "setuid(%lu) done", (unsigned long int)nslcd_cfg->uid);
   }
   /* start worker threads */
   log_log(LOG_INFO, "accepting connections");

http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=1d3b19b1ecd3b10f36e8925e8a752a28e3e74b56

commit 1d3b19b1ecd3b10f36e8925e8a752a28e3e74b56
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Oct 4 21:50:57 2014 +0200

    Block signals sooner to avoid race conditions

diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index e7dbb65..a0c67a6 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -648,6 +648,17 @@ int main(int argc, char *argv[])
 #ifdef HAVE_PTHREAD_TIMEDJOIN_NP
   struct timespec ts;
 #endif /* HAVE_PTHREAD_TIMEDJOIN_NP */
+  /* block all these signals so our worker threads won't handle them */
+  sigemptyset(&signalmask);
+  sigaddset(&signalmask, SIGHUP);
+  sigaddset(&signalmask, SIGINT);
+  sigaddset(&signalmask, SIGQUIT);
+  sigaddset(&signalmask, SIGABRT);
+  sigaddset(&signalmask, SIGPIPE);
+  sigaddset(&signalmask, SIGTERM);
+  sigaddset(&signalmask, SIGUSR1);
+  sigaddset(&signalmask, SIGUSR2);
+  pthread_sigmask(SIG_BLOCK, &signalmask, &oldmask);
   /* close all file descriptors (except stdin/out/err) */
   daemonize_closefds();
   /* parse the command line */
@@ -785,17 +796,6 @@ int main(int argc, char *argv[])
     }
     log_log(LOG_DEBUG, "setuid(%ul) done", (unsigned long int)nslcd_cfg->uid);
   }
-  /* block all these signals so our worker threads won't handle them */
-  sigemptyset(&signalmask);
-  sigaddset(&signalmask, SIGHUP);
-  sigaddset(&signalmask, SIGINT);
-  sigaddset(&signalmask, SIGQUIT);
-  sigaddset(&signalmask, SIGABRT);
-  sigaddset(&signalmask, SIGPIPE);
-  sigaddset(&signalmask, SIGTERM);
-  sigaddset(&signalmask, SIGUSR1);
-  sigaddset(&signalmask, SIGUSR2);
-  pthread_sigmask(SIG_BLOCK, &signalmask, &oldmask);
   /* start worker threads */
   log_log(LOG_INFO, "accepting connections");
   nslcd_threads = (pthread_t *)malloc(nslcd_cfg->threads * sizeof(pthread_t));

-----------------------------------------------------------------------

Summary of changes:
 nslcd/nslcd.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 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/