Hello community, here is the log from the commit of package unscd for openSUSE:Factory checked in at Mon Oct 11 15:03:51 CEST 2010. -------- --- unscd/unscd.changes 2010-05-04 09:12:42.000000000 +0200 +++ unscd/unscd.changes 2010-10-08 23:48:14.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Oct 8 21:46:57 UTC 2010 - cristian.rodriguez@opensuse.org + +- Version 0.47 +* fix a case when we forgot to remove a future entry on worker failure +* fix nscd without -d to not bump debug level + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- nscd-0.45.c unscd-log-dcnt.diff unscd-sigstkflt.diff New: ---- nscd-0.47.c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ unscd.spec ++++++ --- /var/tmp/diff_new_pack.FzYiri/_old 2010-10-11 14:58:24.000000000 +0200 +++ /var/tmp/diff_new_pack.FzYiri/_new 2010-10-11 14:58:24.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package unscd (Version 0.45) +# spec file for package unscd (Version 0.47) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,8 +18,8 @@ Name: unscd -Version: 0.45 -Release: 3 +Version: 0.47 +Release: 1 Summary: Alternative Name Service Caching Daemon Group: System/Daemons License: GPL @@ -32,8 +32,6 @@ Source2: nscd.conf Source3: COPYING Source4: usr.sbin.nscd -Patch0: unscd-sigstkflt.diff -Patch1: unscd-log-dcnt.diff PreReq: %insserv_prereq %description @@ -47,13 +45,11 @@ and may have somewhat worse performance. %prep -%setup -c -T +%setup -q -c -T cp $RPM_SOURCE_DIR/nscd-%version.c . -%patch0 -p1 -%patch1 -p0 %build -cc $RPM_OPT_FLAGS -fpie -pie -o unscd nscd-%version.c +cc -Wl,-z,relro,-z,now $RPM_OPT_FLAGS -fpie -pie -o unscd nscd-%version.c %install install -m 0755 -D unscd $RPM_BUILD_ROOT/%_sbindir/nscd @@ -80,7 +76,7 @@ %files %defattr(-,root,root,-) %config(noreplace) /etc/nscd.conf -%dir %attr(0755,root,root) /etc/apparmor.d +%dir %config %attr(0755,root,root) /etc/apparmor.d %config /etc/apparmor.d/usr.sbin.nscd %config /etc/init.d/nscd %attr(0755,root,root) %_sbindir/* ++++++ nscd-0.45.c -> nscd-0.47.c ++++++ --- unscd/nscd-0.45.c 2010-01-19 03:08:49.000000000 +0100 +++ unscd/nscd-0.47.c 2010-10-08 23:48:13.000000000 +0200 @@ -137,8 +137,10 @@ * how to produce detailed log (no nscd.conf tweaking) * 0.45 Fix out-of-bounds array access and log/pid file permissions - * 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 */ -#define PROGRAM_VERSION "0.45" +#define PROGRAM_VERSION "0.47" #define DEBUG_BUILD 1 @@ -1424,7 +1426,9 @@ signal(SIGILL, worker_signal_handler); signal(SIGFPE, worker_signal_handler); signal(SIGABRT, worker_signal_handler); +#ifdef SIGSTKFLT signal(SIGSTKFLT, worker_signal_handler); +#endif if (ureq.type == GETHOSTBYNAME || ureq.type == GETHOSTBYNAMEv6 @@ -1626,6 +1630,7 @@ /* Not found. Remember a pointer where it will appear */ cinfo[i].cache_pp = cache_pp; + /* If it does not point to our own ureq buffer... */ if (CACHE_PTR(ureq_and_resp) != ureq) { /* We are not the first client who wants this */ log(L_DEBUG, "another request is in progress (%p), waiting for its result", ureq_and_resp); @@ -1802,7 +1807,7 @@ cnt++; } #else - log(L_DEBUG, "poll (%d ms). clients:%u cached:%u hit ratio:%u/%u", + log(L_DEBUG, "poll %d ms. clients:%u cached:%u hit ratio:%u/%u", r, num_clients, cached_cnt, cache_hit_cnt, cache_access_cnt); #endif @@ -1918,10 +1923,25 @@ goto write_out; } - if (pfd[i].revents == POLLHUP) { - /* POLLHUP means we can't write to it anymore */ - log(L_INFO, "client %u disappered (got POLLHUP)", i); - close_client(i); + /* POLLHUP means pfd[i].fd is closed by peer. + * POLLHUP+POLLOUT is seen when we switch for writeout + * and see that pfd[i].fd is closed by peer. */ + if ((pfd[i].revents & ~POLLOUT) == POLLHUP) { + int is_client = (cinfo[i].client_fd == 0 || cinfo[i].client_fd == pfd[i].fd); + log(L_INFO, "%s %u disappeared (got POLLHUP on fd %d)", + is_client ? "client" : "worker", + i, + pfd[i].fd + ); + if (is_client) + close_client(i); + else { + /* Read worker output anyway, error handling + * in that function deals with short read. + * Simply closing client is wrong: it leaks + * shared future entries. */ + handle_worker_response(i); + } continue; } @@ -2445,7 +2465,8 @@ * no -d or -d: 0, -dd: 1, * -ddd: 3, -dddd: 7, -ddddd: 15 */ - debug |= (((1U << opt_d_cnt) >> 1) - 1) & L_ALL; + if (opt_d_cnt != 0) + debug |= (((1U << opt_d_cnt) >> 1) - 1) & L_ALL; env_U = getenv("U"); /* Avoid duplicate warnings if $U exists */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org