]> git.donarmstrong.com Git - unscd.git/commitdiff
update to 0.48
authordon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Sat, 21 Jan 2012 21:40:05 +0000 (21:40 +0000)
committerdon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Sat, 21 Jan 2012 21:40:05 +0000 (21:40 +0000)
debian/changelog
nscd.c

index 0edf035e4d439ff6701e2df3d7c8890acc39888c..b532baf4c1c2d39aacbe4c6fc689c68736397ed9 100644 (file)
@@ -1,3 +1,9 @@
+unscd (0.48-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Don Armstrong <don@debian.org>  Sat, 21 Jan 2012 13:36:59 -0800
+
 unscd (0.47-3) unstable; urgency=low
 
   * Only indicate that the cache is being invalidated when in debug mode
diff --git a/nscd.c b/nscd.c
index 1af5b7a3ae119a220691eafceaf244afb6706ce5..1a8d60dc16646841bee8ec0181d5caac72e1633b 100644 (file)
--- a/nscd.c
+++ b/nscd.c
@@ -139,8 +139,9 @@ vda.linux@googlemail.com
  *        thanks to Sebastian Krahmer (krahmer AT suse.de)
  * 0.46   fix a case when we forgot to remove a future entry on worker failure
  * 0.47   fix nscd without -d to not bump debug level
+ * 0.48   fix for changes in __nss_disable_nscd API in glibc-2.15
  */
-#define PROGRAM_VERSION "0.47"
+#define PROGRAM_VERSION "0.48"
 
 #define DEBUG_BUILD 1
 
@@ -2097,7 +2098,7 @@ static const struct option longopt[] = {
 };
 
 static const char *const help[] = {
-       "Do not daemonize; log to stderr",
+       "Do not daemonize; log to stderr (-dd: more verbosity)",
        "File to read configuration from",
        "Invalidate cache",
        "Shut the server down",
@@ -2347,6 +2348,7 @@ static char* user_to_env_U(const char *user)
 
 
 /* not static - don't inline me, compiler! */
+void readlink_self_exe(void);
 void readlink_self_exe(void)
 {
        char buf[PATH_MAX + 1];
@@ -2397,9 +2399,24 @@ static void special_op(const char *arg)
 }
 
 
+/* Callback for glibc-2.15 */
+struct traced_file;
+static void do_nothing(size_t dbidx, struct traced_file *finfo)
+{
+       /* nscd from glibc-2.15 does something like this:
+       if (!dbs[dbidx].enabled || !dbs[dbidx].check_file)
+               return;
+       add_file_to_watch_list(finfo->fname);
+       */
+}
+
 /* This internal glibc function is called to disable trying to contact nscd.
- * We _are_ nscd, so we need to do the lookups, and not recurse. */
-void __nss_disable_nscd(void);
+ * We _are_ nscd, so we need to do the lookups, and not recurse.
+ * Until 2.14, this function was taking no parameters.
+ * In 2.15, it takes a function pointer from hell.
+ */
+void __nss_disable_nscd(void (*hell)(size_t, struct traced_file*));
+
 
 int main(int argc, char **argv)
 {
@@ -2409,7 +2426,7 @@ int main(int argc, char **argv)
        const char *conffile;
 
        /* make sure we don't get recursive calls */
-       __nss_disable_nscd();
+       __nss_disable_nscd(do_nothing);
 
        if (argv[0][0] == 'w') /* "worker_nscd" */
                worker(argv[1]);