Compare commits

...

27 Commits
f23 ... rawhide

Author SHA1 Message Date
Fedora Release Engineering
360e08a313 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:27:47 +00:00
Petr Menšík
55b24201ff Correct compilation issues 2022-01-22 17:55:34 +01:00
Fedora Release Engineering
ae238f1389 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:05:53 +00:00
Fedora Release Engineering
5a156d0135 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:01:54 +00:00
Fedora Release Engineering
1fa1cdc30e - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:25:26 +00:00
Tom Stellard
e49b76b97e Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 05:57:43 +00:00
Adam Williamson
71b04deeff Rebuild for libldns soname bump 2020-12-19 10:11:06 -08:00
Fedora Release Engineering
cced87a316 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 09:03:33 +00:00
Fedora Release Engineering
fb09a2bd29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 14:51:29 +00:00
Petr Menšík
b47f10fd42 Fix failing mock builds, pass tests (#1736166)
Bug in hosts parsing reported error in comparing expected output.
Parse also last line of /etc/hosts.
2019-09-10 17:09:13 +02:00
Fedora Release Engineering
46b038c6ed - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 18:33:06 +00:00
Petr Menšík
f11f166fd2 Fix invalid strncpy use (#1675450)
Produces error on latest gcc.
2019-02-19 17:25:46 +01:00
Fedora Release Engineering
74a0fd925c - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 12:14:39 +00:00
Igor Gnatenko
7ce1df136e Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:18 +01:00
Igor Gnatenko
92310249fc
Remove obsolete ldconfig scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-22 18:40:29 +01:00
Petr Menšík
5e9a1b476c Rebuilt for unbound 1.8 2018-10-08 16:47:12 +02:00
Fedora Release Engineering
8d2398d7b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 11:32:12 +00:00
Fedora Release Engineering
6407ecc673 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 04:05:35 +00:00
Fedora Release Engineering
2b1032e3d2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 03:55:14 +00:00
Fedora Release Engineering
94c2fcd6a5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 22:51:30 +00:00
Adam Williamson
9325e78b8f Fix a syntax error in a test which broke compilation (pemensik) 2017-03-09 17:04:29 -08:00
Fedora Release Engineering
6be6c23dd2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 22:13:54 +00:00
Pavel Šimerda
e5d30f508b bump 2016-03-17 12:08:01 +01:00
Pavel Šimerda
b296b5c1e6 fix build for rhel 2016-03-14 20:06:44 +01:00
Pavel Šimerda
5e615b8c28 buildable on rhel, updated from git master 2016-03-14 17:26:23 +01:00
Pavel Šimerda
b738e025bb update from git master 2016-03-07 11:10:14 +01:00
Fedora Release Engineering
f6f72c3288 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 09:16:42 +00:00
6 changed files with 224 additions and 27 deletions

View File

@ -0,0 +1,28 @@
From 1b41d34516968023c9eb97f0050f7393982c073b Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Tue, 10 Sep 2019 16:54:24 +0200
Subject: [PATCH] Fix incorrect reading of hosts
When last line is missing newline, data are not correctly read. Parse
also remaining parse space.
---
backends/hosts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backends/hosts.c b/backends/hosts.c
index d3a076c..a93f74c 100644
--- a/backends/hosts.c
+++ b/backends/hosts.c
@@ -160,7 +160,8 @@ read_list(struct hosts_list *list)
new = buffer - 1;
}
}
-
+
+ read_item(list, buffer);
}
out:
close(fd);
--
2.20.1

View File

@ -0,0 +1,29 @@
From 08800e61eaba05265d3d976b0e9922f9bc4c63b2 Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Mon, 18 Feb 2019 20:27:18 +0100
Subject: [PATCH] Always produce zero terminated address
---
lib/backend.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/backend.c b/lib/backend.c
index 1b3dadc..b895651 100644
--- a/lib/backend.c
+++ b/lib/backend.c
@@ -287,8 +287,10 @@ netresolve_backend_add_path(netresolve_query_t query,
if (length)
memcpy(path.node.address, address, length);
- else
- strncpy(path.node.address, address, sizeof path.node.address);
+ else {
+ path.node.address[sizeof(path.node.address)-1] = 0;
+ strncpy(path.node.address, address, sizeof(path.node.address)-1);
+ }
if (query->request.servname && (!socktype || !protocol || !port)) {
struct path_data data = { .query = query, .path = &path };
--
2.20.1

View File

@ -0,0 +1,23 @@
From 7257d3c06c27163e1d7f85bb9ab9e79520444492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 1 Mar 2017 20:30:08 +0100
Subject: [PATCH 1/2] Fix test warning
---
tests/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/common.c b/tests/common.c
index 728997a..308b762 100644
--- a/tests/common.c
+++ b/tests/common.c
@@ -14,7 +14,7 @@ check_address(netresolve_query_t query, int exp_family, const char *exp_address_
assert(netresolve_query_get_count(query) == 1);
netresolve_query_get_node_info(query, 0, &family, &address, &ifindex);
- assert(family = exp_family);
+ assert(family == exp_family);
assert(!memcmp(address, exp_address, family == AF_INET6 ? 16 : 4));
assert(ifindex == exp_ifindex);
}

View File

@ -0,0 +1,41 @@
From 1f30af480852de8aa9ccba77a99d55b06832fc87 Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Sat, 22 Jan 2022 17:51:48 +0100
Subject: [PATCH] Ensure variable is not used after free
Move free to end of function, where it would not need that variable
again.
---
backends/hosts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backends/hosts.c b/backends/hosts.c
index a93f74c..2378b6f 100644
--- a/backends/hosts.c
+++ b/backends/hosts.c
@@ -126,13 +126,13 @@ read_list(struct hosts_list *list)
char *new;
size_t size;
- free(hosts_file);
if (fd == -1) {
error("Cannot read hosts file '%s': %s", hosts_file, strerror(errno));
goto fail_open;
}
+
while (true) {
if (current == end)
goto out;
@@ -166,6 +166,7 @@ read_list(struct hosts_list *list)
out:
close(fd);
fail_open:
+ free(hosts_file);
add_node(list, NULL, 0, NULL, 0);
list->reserved = list->count;
list->items = realloc(list->items, list->reserved * sizeof *list->items);
--
2.31.1

View File

@ -1,22 +1,37 @@
%global snapshot_suffix .20160121git %global snapshot_suffix .20160317git
Name: netresolve Name: netresolve
Version: 0.0.1 Version: 0.0.1
Release: 0.12%{?snapshot_suffix}%{?dist} Release: 0.34%{?snapshot_suffix}%{?dist}
Summary: Generic name resolution library Summary: Generic name resolution library
Group: System Environment/Libraries
License: BSD License: BSD
# https://github.com/crossdistro/netresolve , possibly?
URL: https://sourceware.org/%{name}/ URL: https://sourceware.org/%{name}/
Source0: %{name}-0.0.1.tar.xz Source0: %{name}-0.0.1.tar.xz
# Fix a syntax error in a test
# From https://github.com/crossdistro/netresolve/pull/2
Patch0: netresolve-0.0.1-test-equality.patch
Patch1: netresolve-0.0.1-strncpy.patch
# https://github.com/crossdistro/netresolve/issues/3
Patch2: netresolve-0.0.1-hosts.patch
Patch3: netresolve-0.0.1-use-after-free.patch
BuildRequires: make
BuildRequires: ldns-devel BuildRequires: ldns-devel
BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libcares)
%if 0%{?fedora}
BuildRequires: unbound-devel BuildRequires: unbound-devel
%endif
BuildRequires: pkgconfig(avahi-client) BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(libasyncns) BuildRequires: pkgconfig(libasyncns)
# live builds # live builds
BuildRequires: autoconf automake libtool BuildRequires: autoconf automake libtool
# tests # tests
BuildRequires: valgrind BuildRequires: valgrind
%if 0%{?rhel}
# https://bugzilla.redhat.com/show_bug.cgi?id=1190724
BuildRequires: openssl-devel
%endif
# subpackages installed by netresolve virtual package # subpackages installed by netresolve virtual package
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
Requires: %{name}-tools%{?_isa} = %{version}-%{release} Requires: %{name}-tools%{?_isa} = %{version}-%{release}
@ -31,14 +46,12 @@ glibc as well as a testbed for future glibc improvements.
%package core %package core
Summary: Core netresolve libraries Summary: Core netresolve libraries
Group: Development/Libraries
%description core %description core
This package provides core netresolve library with basic name resolution This package provides core netresolve library with basic name resolution
capabilities for tools and application. capabilities for tools and application.
%package compat %package compat
Summary: Compatibility netresolve libraries and tools Summary: Compatibility netresolve libraries and tools
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description compat %description compat
This package provides libraries and tools for using netresolve from applications This package provides libraries and tools for using netresolve from applications
@ -46,7 +59,6 @@ built against other name resolution libraries.
%package tools %package tools
Summary: Command line tools based on core netresolve libraries Summary: Command line tools based on core netresolve libraries
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description tools %description tools
This package provides tools that provide netresolve capabilities using the This package provides tools that provide netresolve capabilities using the
@ -55,14 +67,12 @@ command line.
%package backends-compat %package backends-compat
Summary: Backends for netresolve using existing tools Summary: Backends for netresolve using existing tools
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
Group: Development/Libraries
%description backends-compat %description backends-compat
This package provides backends for querying libc, glibc nsswitch backends, This package provides backends for querying libc, glibc nsswitch backends,
asyncns and other existing name resolution libraries. asyncns and other existing name resolution libraries.
%package backends-aresdns %package backends-aresdns
Summary: DNS backend for netresolve based on aresdns Summary: DNS backend for netresolve based on aresdns
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description backends-aresdns %description backends-aresdns
This package provides DNS capabilities including learning DNSSEC validity This package provides DNS capabilities including learning DNSSEC validity
@ -70,30 +80,29 @@ from the AD flag for netresolve using c-ares.
%package backends-avahi %package backends-avahi
Summary: Multicast DNS backend for netresolve based on libavahi Summary: Multicast DNS backend for netresolve based on libavahi
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description backends-avahi %description backends-avahi
This package provides Multicast DNS capabilities using Avahi daemon and This package provides Multicast DNS capabilities using Avahi daemon and
libraries. libraries.
%if 0%{?fedora}
%package backends-ubdns %package backends-ubdns
Summary: DNS backend for netresolve based on libunbound Summary: DNS backend for netresolve based on libunbound
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description backends-ubdns %description backends-ubdns
This package provides DNS capabilities including DNSSEC validation to This package provides DNS capabilities including DNSSEC validation to
netresolve using libunbound. netresolve using libunbound.
%endif
%package devel %package devel
Summary: Development files for netresolve Summary: Development files for netresolve
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %description devel
This package contains header files and libraries needed to compile This package contains header files and libraries needed to compile
applications or shared objects that use netresolve. applications or shared objects that use netresolve.
%prep %prep
%setup -q %autosetup -p1
NOCONFIGURE=yes ./autogen.sh NOCONFIGURE=yes ./autogen.sh
# disable some tests for now # disable some tests for now
@ -111,30 +120,27 @@ make %{?_smp_mflags}
%make_install %make_install
find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.la' -delete
%if 0%{?fedora}
%check %check
export NETRESOLVE_TEST_COMMAND="libtool execute valgrind --leak-check=full --error-exitcode=1 ./netresolve" export NETRESOLVE_TEST_COMMAND="libtool execute valgrind --leak-check=full --error-exitcode=1 ./netresolve"
make check || { cat ./test-suite.log; false; } make check || { cat ./test-suite.log; false; }
%endif
%post -p /sbin/ldconfig %ldconfig_scriptlets
%postun -p /sbin/ldconfig
%post core -p /sbin/ldconfig %ldconfig_scriptlets core
%postun core -p /sbin/ldconfig
%post compat -p /sbin/ldconfig %ldconfig_scriptlets compat
%postun compat -p /sbin/ldconfig
%post backends-compat -p /sbin/ldconfig %ldconfig_scriptlets backends-compat
%postun backends-compat -p /sbin/ldconfig
%post backends-aresdns -p /sbin/ldconfig %ldconfig_scriptlets backends-aresdns
%postun backends-aresdns -p /sbin/ldconfig
%post backends-ubdns -p /sbin/ldconfig %if 0%{?fedora}
%postun backends-ubdns -p /sbin/ldconfig %ldconfig_scriptlets backends-ubdns
%endif
%post backends-avahi -p /sbin/ldconfig %ldconfig_scriptlets backends-avahi
%postun backends-avahi -p /sbin/ldconfig
%files %files
@ -191,9 +197,11 @@ make check || { cat ./test-suite.log; false; }
%{_libdir}/libnetresolve-backend-avahi.so.0 %{_libdir}/libnetresolve-backend-avahi.so.0
%{_libdir}/libnetresolve-backend-avahi.so.0.0.0 %{_libdir}/libnetresolve-backend-avahi.so.0.0.0
%if 0%{?fedora}
%files backends-ubdns %files backends-ubdns
%{_libdir}/libnetresolve-backend-ubdns.so.0 %{_libdir}/libnetresolve-backend-ubdns.so.0
%{_libdir}/libnetresolve-backend-ubdns.so.0.0.0 %{_libdir}/libnetresolve-backend-ubdns.so.0.0.0
%endif
%files devel %files devel
%{_includedir}/netresolve-epoll.h %{_includedir}/netresolve-epoll.h
@ -221,13 +229,81 @@ make check || { cat ./test-suite.log; false; }
%{_libdir}/libnetresolve-backend-loopback.so %{_libdir}/libnetresolve-backend-loopback.so
%{_libdir}/libnetresolve-backend-nss.so %{_libdir}/libnetresolve-backend-nss.so
%{_libdir}/libnetresolve-backend-numerichost.so %{_libdir}/libnetresolve-backend-numerichost.so
%if 0%{?fedora}
%{_libdir}/libnetresolve-backend-ubdns.so %{_libdir}/libnetresolve-backend-ubdns.so
%endif
%{_libdir}/libnetresolve-backend-unix.so %{_libdir}/libnetresolve-backend-unix.so
%{_libdir}/libnetresolve-libc.so %{_libdir}/libnetresolve-libc.so
%{_libdir}/libnetresolve.so %{_libdir}/libnetresolve.so
%{_libdir}/libnss_netresolve.so %{_libdir}/libnss_netresolve.so
%changelog %changelog
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.34.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.33.20160317git
- Correct compilation issues
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.32.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.31.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.30.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 19 2020 Adam Williamson <awilliam@redhat.com> - 0.0.1-0.29.20160317git
- Rebuild for libldns soname bump
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.28.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.27.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Sep 10 2019 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.26.20160317git
- Pass tests even without trailing newline in hosts (#1736166)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.25.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Feb 19 2019 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.24.20160317git
- Fix build under new gcc (#1675450)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.23.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 08 2018 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.22.20160317git
- Rebuilt for unbound 1.8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.21.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.20.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.19.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.18.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Mar 09 2017 Adam Williamson <awilliam@redhat.com> - 0.0.1-0.17.20160317git
- Fix a syntax error in a test which broke compilation (pemensik)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.16.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Mar 14 2016 Pavel Šimerda <psimerda@redhat.com> - 0.0.1-0.15.20160314git
- buildable on rhel, updated from git master
* Mon Mar 07 2016 Pavel Šimerda <psimerda@redhat.com> - 0.0.1-0.14.20160307git
- update from git master
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.13.20160121git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 21 2016 Pavel Šimerda <psimerda@redhat.com> - 0.0.1-0.12.20160121git * Thu Jan 21 2016 Pavel Šimerda <psimerda@redhat.com> - 0.0.1-0.12.20160121git
- updated live source - updated live source

View File

@ -1 +1 @@
40b5c358e527790e86c6baa01824899c netresolve-0.0.1.tar.xz 6280c91a682b52582b3394f331a802ba netresolve-0.0.1.tar.xz