Subject: Re: [Patch] Inability to override search domains

Re: [Patch] Inability to override search domains

From: Jakub Hrozek <jhrozek_at_redhat.com>
Date: Thu, 22 May 2014 16:35:34 +0200

On Thu, May 22, 2014 at 10:30:05AM +0200, Jakub Hrozek wrote:
> On Mon, May 19, 2014 at 09:13:24PM +0200, Jakub Hrozek wrote:
> > On Fri, Jan 24, 2014 at 03:38:37PM +0000, David Drysdale wrote:
> > > Hi Daniel,
> > >
> > > I don't think it's currently possible to explicitly set the search domains
> > > for c-ares -- any values specified in ares_options get overwritten by the
> > > values from /etc/resolv.conf. Looking back through the history, this seems
> > > to be a side effect of the change in commit
> > > 125b1a8619eb27<https://github.com/bagder/c-ares/commit/125b1a8619eb27>,
> > > which fixed an earlier problem where the first domain/search entry in
> > > /etc/resolv.conf was used rather than the last.
> > >
> > > I've attached a couple of potential patches below:
> > > - The first adds a "-s domain" option to ahost to allow a search domain to
> > > be specified, to allow the problem to be exhibited (e.g with './ahost -s
> > > icann.org. www')
> > > - The second fixes init_by_resolv_conf() so it only updates the domains if
> > > they were missing at function entry.
> > >
> > > Regards,
> > > David
> >
> > Hi,
> >
> > since I'm the one who broke the functionality, I took a look at the
> > patch (looks good!) and ran a very simple test, which passed.
> >
> > Sorry about the breakage, we don't use this functionality and I'm afraid
> > I didn't test it.
> >
> > The second patch has my +1. I haven't tested the first one, but it looks
> > good to me as well..
>
> Daniel, OK if I push this patch?

Pushed to master as:
    7df69c0f79af61b0aa402e688672e38434467aa6
    ee22246507c9ee111ade9554b3268ee34c8219b7
Received on 2014-05-22