fix segfault when no domain is defined in resolv.conf

This commit is contained in:
Lennart Poettering 2007-09-25 00:20:49 +00:00
parent e8f575580d
commit fc03bc04d3
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,14 @@
Index: /trunk/avahi-daemon/main.c
===================================================================
--- /trunk/avahi-daemon/main.c (revision 1513)
+++ /trunk/avahi-daemon/main.c (revision 1525)
@@ -317,4 +317,9 @@
int n;
char **p;
+
+ if (!resolv_conf_search_domains) {
+ avahi_server_set_browse_domains(avahi_server, NULL);
+ return;
+ }
l = avahi_string_list_copy(config.server_config.browse_domains);

View File

@ -6,10 +6,10 @@
%endif
Name: avahi
Version: 0.6.21
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Local network service discovery
Group: System Environment/Base
License: LGPL
License: LGPLv2
URL: http://avahi.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: dbus, expat
@ -40,6 +40,7 @@ Patch1: avahi-0.6.21-avahi-browse-help-fix.patch
Patch2: avahi-0.6.3-MONO_SHARED_DIR.patch
Patch3: avahi-0.6.21-initscript.patch
Patch4: avahi-0.6.21-libdns_sd-fix.patch
Patch5: avahi-0.6.21-resolv-conf.patch
%description
Avahi is a system which facilitates service discovery on
@ -225,6 +226,7 @@ fashion with mDNS.
%endif
%patch3 -p0 -b .initscript
%patch4 -p0 -b .dns_sd
%patch5 -p2 -b .resolv_conf
%build
@ -485,6 +487,9 @@ fi
%endif
%changelog
* Tue Sep 25 2007 Lennart Poettering <lpoetter@redhat.com> - 0.6.21-6
- resolves #279301: fix segfault when no domains are configured in resolv.conf (pulled from upstream SVN r1525)
* Thu Sep 6 2007 Lennart Poettering <lpoetter@redhat.com> - 0.6.21-5
- resolves #249044: Update init script to use runlevel 96
- resolves #251700: Fix assertion in libdns_sd-compat