Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98071 Details for
Bug 149124
sys-libs/glibc : clients never reload /etc/resolv.conf when it changes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Force reload of /etc/resolv.conf whenever it is updated
glibc-gentoo-reload-conf.patch (text/plain), 1017 bytes, created by
Xavier Maillard
on 2006-09-25 15:17:37 UTC
(
hide
)
Description:
Force reload of /etc/resolv.conf whenever it is updated
Filename:
MIME Type:
Creator:
Xavier Maillard
Created:
2006-09-25 15:17:37 UTC
Size:
1017 bytes
patch
obsolete
>--- glibc-2.4/resolv/res_libc.c.orig 2005-11-01 01:06:40.000000000 +0100 >+++ glibc-2.4/resolv/res_libc.c 2006-09-26 00:00:22.000000000 +0200 >@@ -22,7 +22,7 @@ > #include <arpa/nameser.h> > #include <resolv.h> > #include <bits/libc-lock.h> >- >+#include <sys/stat.h> > > /* 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,10 +94,18 @@ > int > __res_maybe_init (res_state resp, int preinit) > { >+ static time_t last_mtime; >+ struct stat statbuf; >+ int ret; >+ >+ > if (resp->options & RES_INIT) { >- if (__res_initstamp != resp->_u._ext.initstamp) { >- if (resp->nscount > 0) { >- __res_iclose (resp, true); >+ 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); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 149124
: 98071