Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 377595

Summary: sys-libs/glibc: please support having resolv.conf in /var
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED UPSTREAM    
Severity: enhancement CC: binki, dagger, lack, nirbheek, openrc, pchrist, qiaomuf, radek, steev
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-08-03 17:59:06 UTC
Considering that in modern systems resolv.conf is often generated (and thus written) in runtime, /etc seems no longer correct location for it. What I'd really like to see is glibc looking for it somewhere in /var, and falling back to static /etc/resolv.conf if not found.

I'm CC-ing NetworkManager, openresolv & openrc maintainers, as they're major cases of rewriting resolv.conf in Gentoo.

I've already suggested that to NetworkManager upstream [1], and it seems that NM will allow supplying alternate resolv.conf path [2]. Not sure, however, if we should first post this to glibc ml or try to get a working implementation.

[1]:http://mail.gnome.org/archives/networkmanager-list/2011-August/msg00031.html
[2]:http://mail.gnome.org/archives/networkmanager-list/2011-August/msg00032.html
Comment 1 William Hubbs gentoo-dev 2011-08-03 22:49:17 UTC
My concern about putting it in /var would be, will it be available early
enough if /var is on a separate partition?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-08-04 02:13:03 UTC
(In reply to comment #1)
> My concern about putting it in /var would be, will it be available early
> enough if /var is on a separate partition?

That's why I'm suggesting not using weird kinds of things like symlinks and just falling back to /etc when not available at the moment. If someone needs resolver that early during the bootup, he/she is probably ok with some kind of static configuration as well.

Also, someone mentioned using tmpfs-mounted /run for it. That seems like quite a good solution too.
Comment 3 SpanKY gentoo-dev 2011-08-06 10:23:52 UTC
i'm not interested in mucking with glibc ahead of it being merged upstream.  if you want to develop/test, then you can easily do that yourself.

as for symlinks + /var not being available, nothing is stopping you from keeping your "fallback" resolv.conf in an otherwise empty /var until it gets a chance to be mounted.  nothing says /var must be empty in order to mount on top if it.

so from the glibc perspective, there's nothing to do here.  i think that really only leaves openresolv.