Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377595 - sys-libs/glibc: please support having resolv.conf in /var
Summary: sys-libs/glibc: please support having resolv.conf in /var
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-03 17:59 UTC by Michał Górny
Modified: 2012-04-13 23:37 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.