From 1d7653a4040c77cc803a5e0cb5aebc824a66d58b Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 29 Jan 2008 23:27:41 +0000 Subject: glibc 2.5, 2.6.1: * check for updated resolv.conf before a nameserver call (see debian bug #272265) * remove bogus executable attribute for patch * clean up ugly mixing of tabs and spaces --- .../files/glibc-2.5-local-dynamic-resolvconf.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch (limited to 'packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch') diff --git a/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch b/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch new file mode 100644 index 0000000000..bab3747b1a --- /dev/null +++ b/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch @@ -0,0 +1,44 @@ +--- glibc-2.5.orig/debian/patches/any/local-dynamic-resolvconf.diff ++++ glibc-2.5/debian/patches/any/local-dynamic-resolvconf.diff +@@ -0,0 +1,41 @@ ++# All lines beginning with `# DP:' are a description of the patch. ++# DP: Description: allow dynamic long-running processes to ++# DP: re-read a dynamically updated resolv.conf on the fly ++# DP: Dpatch author: Adam Conrad ++# DP: Patch author: Thorsten Kukuk ++# DP: Upstream status: Ubuntu-Specific ++# DP: Date: 2006-01-13 08:14:21 UTC ++ ++Index: resolv/res_libc.c ++=================================================================== ++--- resolv/res_libc.c.orig +++++ resolv/res_libc.c ++@@ -22,7 +22,7 @@ ++ #include ++ #include ++ #include ++- +++#include ++ ++ /* The following bit is copied from res_data.c (where it is #ifdef'ed ++ out) since res_init() should go into libc.so but the rest of that ++@@ -94,8 +94,17 @@ ++ int ++ __res_maybe_init (res_state resp, int preinit) ++ { ++- if (resp->options & RES_INIT) { ++- if (__res_initstamp != resp->_u._ext.initstamp) { +++ static time_t last_mtime; +++ struct stat statbuf; +++ int ret; +++ +++ +++ if (resp->options & RES_INIT) { +++ ret = stat (_PATH_RESCONF, &statbuf); +++ if (__res_initstamp != resp->_u._ext.initstamp +++ || (ret == 0) && (last_mtime != statbuf.st_mtime)) +++ { +++ last_mtime = statbuf.st_mtime; ++ if (resp->nscount > 0) { ++ __res_iclose (resp, true); ++ return __res_vinit (resp, 1); -- cgit v1.2.3