rpms/c-ares/devel 0001-ares_init-Last-not-first-instance-of-domain-or-searc.patch, NONE, 1.1 c-ares.spec, 1.21, 1.22
Jakub Hrozek
jhrozek at fedoraproject.org
Thu Jun 3 12:00:25 UTC 2010
Author: jhrozek
Update of /cvs/pkgs/rpms/c-ares/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv12900
Modified Files:
c-ares.spec
Added Files:
0001-ares_init-Last-not-first-instance-of-domain-or-searc.patch
Log Message:
Fix search domain order - RHBZ #597286
0001-ares_init-Last-not-first-instance-of-domain-or-searc.patch:
ares_init.3 | 23 ++++++++++++++++++++++-
ares_init.c | 5 ++---
2 files changed, 24 insertions(+), 4 deletions(-)
--- NEW FILE 0001-ares_init-Last-not-first-instance-of-domain-or-searc.patch ---
>From 125b1a8619eb27556e093fd9c9adf451e896f012 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 31 May 2010 16:32:54 +0200
Subject: [PATCH] ares_init: Last, not first instance of domain or search should win
diff --git a/ares_init.3 b/ares_init.3
index 00ff36d..fb25306 100644
--- a/ares_init.3
+++ b/ares_init.3
@@ -109,7 +109,7 @@ or the domain derived from the kernel hostname variable.
.B ARES_OPT_LOOKUPS
.B char *\fIlookups\fP;
.br
-The lookups to perform for host queries.
+The lookups to perform for host queries.
.I lookups
should be set to a string of the characters "b" or "f", where "b"
indicates a DNS lookup and "f" indicates a lookup in the hosts file.
@@ -189,6 +189,27 @@ The process's available memory was exhausted.
.TP 14
.B ARES_ENOTINITIALIZED
c-ares library initialization not yet performed.
+.SH NOTES
+When initializing from
+.B /etc/resolv.conf,
+.BR ares_init (3)
+reads the
+.I domain
+and
+.I search
+directives to allow lookups of short names relative to the domains
+specified. The
+.I domain
+and
+.I search
+directives override one another. If more that one instance of either
+.I domain
+or
+.I search
+directives is specified, the last occurence wins. For more information,
+please see the
+.BR resolv.conf (5)
+manual page.
.SH SEE ALSO
.BR ares_destroy(3),
.BR ares_dup(3),
diff --git a/ares_init.c b/ares_init.c
index 1f561aa..9d1e447 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -839,11 +839,11 @@ DhcpNameServer
if (fp) {
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
- if ((p = try_config(line, "domain")) && channel->ndomains == -1)
+ if ((p = try_config(line, "domain")))
status = config_domain(channel, p);
else if ((p = try_config(line, "lookup")) && !channel->lookups)
status = config_lookup(channel, p, "bind", "file");
- else if ((p = try_config(line, "search")) && channel->ndomains == -1)
+ else if ((p = try_config(line, "search")))
status = set_search(channel, p);
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
status = config_nameserver(&servers, &nservers, p);
--
1.6.6.1
Index: c-ares.spec
===================================================================
RCS file: /cvs/pkgs/rpms/c-ares/devel/c-ares.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- c-ares.spec 23 Mar 2010 15:03:25 -0000 1.21
+++ c-ares.spec 3 Jun 2010 12:00:25 -0000 1.22
@@ -1,13 +1,14 @@
Summary: A library that performs asynchronous DNS operations
Name: c-ares
Version: 1.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://c-ares.haxx.se/
Source0: http://c-ares.haxx.se/c-ares-%{version}.tar.gz
Source1: LICENSE
Patch0: %{name}-1.7.0-optflags.patch
+Patch1: 0001-ares_init-Last-not-first-instance-of-domain-or-searc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@@ -28,6 +29,7 @@ compile applications or shared objects t
%prep
%setup -q
%patch0 -p1 -b .optflags
+%patch1 -p1 -b .search
cp %{SOURCE1} .
f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
@@ -64,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/ares_*
%changelog
+* Thu Jun 3 2010 Jakub Hrozek <jhrozek at redhat.com> - 1.7.1-2
+- Use last instance of search/domain, not the first one (#597286)
+
* Tue Mar 23 2010 Jakub Hrozek <jhrozek at redhat.com> - 1.7.1-1
- update to 1.7.1 which contains the IPv6 nameserver patch
More information about the scm-commits
mailing list