From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12651 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] resolv.conf parser: concatenate multiple search domain lines Date: Fri, 30 Mar 2018 09:21:25 -0400 Message-ID: <20180330132125.GQ1436@brightrain.aerifal.cx> References: <20180330105159.19583-1-nenolod@dereferenced.org> <20180330142742.04e8fc3f@fifth.space> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1522415984 10446 195.159.176.226 (30 Mar 2018 13:19:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2018 13:19:44 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12665-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 30 15:19:40 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f1twR-0002aY-80 for gllmg-musl@m.gmane.org; Fri, 30 Mar 2018 15:19:39 +0200 Original-Received: (qmail 24425 invoked by uid 550); 30 Mar 2018 13:21:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24312 invoked from network); 30 Mar 2018 13:21:41 -0000 Content-Disposition: inline In-Reply-To: <20180330142742.04e8fc3f@fifth.space> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12651 Archived-At: On Fri, Mar 30, 2018 at 02:27:42PM +0200, Quentin Rameau wrote: > Hi William, > > > Programs such as Docker and Kubernetes write multiple domain search > > lines, such as > > > > search serious-business.big-data.prod.foo.com > > search big-data.prod.foo.com > > search prod.foo.com > > > > instead of > > > > search serious-business.big-data.prod.foo.com big-data.prod.foo.com > > prod.foo.com > > > > Accordingly, we concatenate the namelist together so that the search > > path is not truncated. > > I think this patch should be sent to Docker and Kubernetes instead of > pushing a mitigation for their bug in the libc. > > According to documentation, “The domain and search keywords are > mutually exclusive. If more than one instance of these keywords is > present, the last instance wins.” > > This patch would break existing applications relying on documented > behaviour. I wrote the current behavior based on that documentation. Apparently the current glibc behavior does not match the documentation, but I'd really rather not go against the documentation unless there's agreement from glibc/others that the documentation is wrong and their current behavior is desired. Either way I think Docker/Kubernetes should fix this, since it's ambiguous what the "right" thing to do is and there very well could end up being inconsistent behaviors between libcs/versions into the future. Rich