NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/48379: resolv.conf symlink changes not picked up by resolver

>Number:         48379
>Category:       bin
>Synopsis:       resolv.conf symlink changes not picked up by resolver
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 13 17:30:00 +0000 2013
>Originator:     David Brownlee
>Release:        NetBSD-6.1
NetBSD 6.1_STABLE NetBSD 6.1_STABLE (GENERIC) #0: Thu Oct 24 
13:50:23 BST 2013

The system automatically detects changes to /etc/resolv.conf and reloads as 

This works fine if /etc/resolv.conf is a file and changes, or if 
/etc/resolv.conf is a symlink and the contents of the file linked to changes, 
but fails if /etc/resolv.conf is a symlink to one file and changes to a symlink 
to another file.

Assuming working nameserver at and no nameserver at

cd /etc
echo 'nameserver' > resolv.1
ln -sf resolv.1 resolv.conf
[start app such as firefox, enter url with hostname, confirm it fails]
echo 'nameserver' > resolv.2
ln -sf resolv.2 resolv.conf
[try URL in firefox - it should now work, but fails]
touch resolv.1
[try URL in firefox - it now works, presumably as the system is checking for 
updates to resolv.1]

The system would need to handle the case of symlink specifically, and reload if 
readlink() changes, or the timestamp of the (final) linked to file changes.

Home | Main Index | Thread Index | Old Index