Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
32
.gitignore
vendored
32
.gitignore
vendored
@ -1 +1,31 @@
|
||||
SOURCES/radvd-2.17.tar.xz
|
||||
radvd-1.6.tar.gz
|
||||
/radvd-1.7.tar.gz
|
||||
/radvd-1.8.tar.gz
|
||||
/radvd-1.8.1.tar.gz
|
||||
/radvd-1.8.2.tar.gz
|
||||
/radvd-1.8.3.tar.gz
|
||||
/radvd-1.8.4.tar.gz
|
||||
/radvd-1.8.5.tar.gz
|
||||
/radvd-1.9.tar.gz
|
||||
/radvd-1.9.1.tar.gz
|
||||
/radvd-1.9.2.tar.gz
|
||||
/radvd-1.9.7.tar.gz
|
||||
/radvd-1.9.8.tar.gz
|
||||
/radvd-1.9.9.tar.gz
|
||||
/radvd-1.10.0.tar.gz
|
||||
/radvd-1.11.tar.gz
|
||||
/radvd-1.12.tar.gz
|
||||
/radvd-1.14.tar.gz
|
||||
/radvd-2.0.tar.bz2
|
||||
/radvd-2.1.tar.bz2
|
||||
/radvd-2.2.tar.bz2
|
||||
/radvd-2.5.tar.bz2
|
||||
/radvd-2.8.tar.bz2
|
||||
/radvd-2.10.tar.bz2
|
||||
/radvd-2.11.tar.xz
|
||||
/radvd-2.13.tar.xz
|
||||
/radvd-2.14.tar.xz
|
||||
/radvd-2.16.tar.xz
|
||||
/radvd-2.17.tar.xz
|
||||
/radvd-2.18.tar.xz
|
||||
/radvd-2.19.tar.xz
|
||||
|
@ -1 +0,0 @@
|
||||
e6aefd1f94c11c198271622989deefa647a489b5 SOURCES/radvd-2.17.tar.xz
|
@ -1,65 +0,0 @@
|
||||
From 57295ef0e85640adcc3b85f08b12f09d54aad2d2 Mon Sep 17 00:00:00 2001
|
||||
From: Tomi Salminen <tsalminen@forcepoint.com>
|
||||
Date: Tue, 16 Apr 2019 13:55:39 +0300
|
||||
Subject: [PATCH] Crash on SIGHUP when config file removed.
|
||||
|
||||
Reading config zeroed the returnable configuration only when the
|
||||
config file was opened successfully. If not, the previously read
|
||||
in configuration was returned, which was already freed.
|
||||
|
||||
Moved configuration zeroing to start of readin_config and added
|
||||
unit test to test zero return.
|
||||
---
|
||||
gram.y | 2 +-
|
||||
test/util.c | 15 +++++++++++++++
|
||||
2 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gram.y b/gram.y
|
||||
index 20af2f3..4115390 100644
|
||||
--- a/gram.y
|
||||
+++ b/gram.y
|
||||
@@ -947,10 +947,10 @@ static void cleanup(void)
|
||||
|
||||
struct Interface * readin_config(char const *path)
|
||||
{
|
||||
+ IfaceList = 0;
|
||||
FILE * in = fopen(path, "r");
|
||||
if (in) {
|
||||
filename = path;
|
||||
- IfaceList = 0;
|
||||
num_lines = 1;
|
||||
iface = 0;
|
||||
|
||||
diff --git a/test/util.c b/test/util.c
|
||||
index b74b301..7124475 100644
|
||||
--- a/test/util.c
|
||||
+++ b/test/util.c
|
||||
@@ -259,6 +259,20 @@ START_TEST(test_rand_between)
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_cfg_removal_with_sighup)
|
||||
+{
|
||||
+ struct Interface *tmpIface = NULL;
|
||||
+
|
||||
+ tmpIface = readin_config("test/test1.conf");
|
||||
+ ck_assert(tmpIface);
|
||||
+
|
||||
+ free_ifaces(tmpIface);
|
||||
+
|
||||
+ tmpIface = readin_config("test/file_that_should_not_exists.conf");
|
||||
+ ck_assert(!tmpIface);
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
Suite *util_suite(void)
|
||||
{
|
||||
TCase *tc_safe_buffer = tcase_create("safe_buffer");
|
||||
@@ -288,6 +302,7 @@ Suite *util_suite(void)
|
||||
|
||||
TCase *tc_misc = tcase_create("misc");
|
||||
tcase_add_test(tc_misc, test_rand_between);
|
||||
+ tcase_add_test(tc_misc, test_cfg_removal_with_sighup);
|
||||
|
||||
Suite *s = suite_create("util");
|
||||
suite_add_tcase(s, tc_safe_buffer);
|
@ -1,23 +0,0 @@
|
||||
From fb1529d0573d3d9744a0e9fea8dd0becfc91ad85 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||
Date: Thu, 24 Jan 2019 13:21:55 +0100
|
||||
Subject: [PATCH] Fix double-free scenario in case if duplicate interface was
|
||||
specified (Fixes #100).
|
||||
|
||||
Signed-off-by: Pavel Zhukov <pzhukov@redhat.com>
|
||||
---
|
||||
gram.y | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gram.y b/gram.y
|
||||
index 5db3bde..20af2f3 100644
|
||||
--- a/gram.y
|
||||
+++ b/gram.y
|
||||
@@ -958,6 +958,7 @@ struct Interface * readin_config(char const *path)
|
||||
if (yyparse() != 0) {
|
||||
free_ifaces(iface);
|
||||
iface = 0;
|
||||
+ IfaceList = 0;
|
||||
} else {
|
||||
dlog(LOG_DEBUG, 1, "config file, %s, syntax ok", path);
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Router advertisement daemon for IPv6
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/sysconfig/radvd
|
||||
ExecStart=/usr/sbin/radvd $OPTIONS
|
||||
Type=forking
|
||||
PIDFile=/var/run/radvd/radvd.pid
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,25 +0,0 @@
|
||||
From 5ad279f48c0f3d94573e3f3c887f86cd10476c2d Mon Sep 17 00:00:00 2001
|
||||
From: David Hallas <david@davidhallas.dk>
|
||||
Date: Wed, 4 Apr 2018 06:36:12 +0200
|
||||
Subject: [PATCH] Fixes memory leak in add_ra_options_dnssl
|
||||
|
||||
The add_ra_options_dnssl function failed to free memory before
|
||||
returning.
|
||||
---
|
||||
send.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/send.c b/send.c
|
||||
index 0a4951a..4b83d57 100644
|
||||
--- a/send.c
|
||||
+++ b/send.c
|
||||
@@ -527,8 +527,8 @@ static struct safe_buffer_list *add_ra_options_dnssl(struct safe_buffer_list *sb
|
||||
|
||||
dnssl = dnssl->next;
|
||||
}
|
||||
- return sbl;
|
||||
safe_buffer_free(serialized_domains);
|
||||
+ return sbl;
|
||||
}
|
||||
|
||||
/*
|
@ -1,18 +0,0 @@
|
||||
From 30198b37dd9d8cb3b15c90663145d06e2531d87f Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||
Date: Tue, 26 Feb 2019 14:37:16 +0100
|
||||
Subject: [PATCH] packaging: Change location of tmpfiles to /run to avoid
|
||||
warnings
|
||||
|
||||
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1678147
|
||||
---
|
||||
redhat/systemd/radvd-tmpfs.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/redhat/systemd/radvd-tmpfs.conf b/redhat/systemd/radvd-tmpfs.conf
|
||||
index 590652c..26f203d 100644
|
||||
--- a/redhat/radvd-tmpfs.conf
|
||||
+++ b/redhat/radvd-tmpfs.conf
|
||||
@@ -1 +1 @@
|
||||
-d /var/run/radvd 0755 radvd radvd
|
||||
+d /run/radvd 0755 radvd radvd
|
9
gating.yaml
Normal file
9
gating.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation}
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
Summary: A Router Advertisement daemon
|
||||
Name: radvd
|
||||
Version: 2.17
|
||||
Release: 15%{?dist}
|
||||
Version: 2.19
|
||||
Release: 5%{?dist}
|
||||
|
||||
# The code includes the advertising clause, so it's GPL-incompatible
|
||||
License: BSD with advertising
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.litech.org/radvd/
|
||||
Source0: %{url}dist/%{name}-%{version}.tar.xz
|
||||
Source1: radvd.service
|
||||
Source1: radvd.sysusers
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
@ -16,13 +17,9 @@ BuildRequires: flex-static
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: check-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
Patch0: radvd_add_ra_memleak.patch
|
||||
Patch1: radvd_tmpfiles.patch
|
||||
Patch2: radvd-double_free_dupiface.patch
|
||||
Patch3: radvd-crash_if_config_removed.patch
|
||||
%{?sysusers_requires_compat}
|
||||
|
||||
%description
|
||||
radvd is the router advertisement daemon for IPv6. It listens to router
|
||||
@ -36,7 +33,7 @@ Install radvd if you are setting up IPv6 network and/or Mobile IPv6
|
||||
services.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -p1
|
||||
|
||||
for F in CHANGES; do
|
||||
iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new"
|
||||
@ -45,30 +42,31 @@ for F in CHANGES; do
|
||||
done
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fPIE "
|
||||
export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen'
|
||||
%configure \
|
||||
--with-check \
|
||||
--disable-silent-rules \
|
||||
--with-pidfile=/run/radvd/radvd.pid
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install
|
||||
%make_install
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
mkdir -p %{buildroot}/run/radvd
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
|
||||
install -m 644 redhat/radvd.conf.empty %{buildroot}%{_sysconfdir}/radvd.conf
|
||||
install -m 644 redhat/radvd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/radvd
|
||||
install -m 644 redhat/SysV/radvd.conf.empty %{buildroot}%{_sysconfdir}/radvd.conf
|
||||
install -m 644 redhat/SysV/radvd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/radvd
|
||||
|
||||
install -d -m 755 %{buildroot}%{_tmpfilesdir}
|
||||
install -p -m 644 redhat/radvd-tmpfs.conf %{buildroot}%{_tmpfilesdir}/radvd.conf
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||
install -p -m 644 redhat/systemd/radvd-tmpfs.conf %{buildroot}%{_tmpfilesdir}/radvd.conf
|
||||
install -m 644 redhat/systemd/radvd.service %{buildroot}%{_unitdir}
|
||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/radvd.conf
|
||||
|
||||
%check
|
||||
# The tests don't work, see https://github.com/reubenhwk/radvd/issues/30
|
||||
#make check
|
||||
make check
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart radvd.service
|
||||
@ -79,12 +77,8 @@ install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||
%preun
|
||||
%systemd_preun radvd.service
|
||||
|
||||
# Static UID and GID defined by /usr/share/doc/setup-*/uidgid
|
||||
%pre
|
||||
getent group radvd >/dev/null || groupadd -r -g 75 radvd
|
||||
getent passwd radvd >/dev/null || \
|
||||
useradd -r -u 75 -g radvd -d / -s /sbin/nologin -c "radvd user" radvd
|
||||
exit 0
|
||||
%sysusers_create_compat %{SOURCE1}
|
||||
|
||||
%files
|
||||
%doc CHANGES COPYRIGHT INTRO.html README TODO
|
||||
@ -92,6 +86,7 @@ exit 0
|
||||
%config(noreplace) %{_sysconfdir}/radvd.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/radvd
|
||||
%{_tmpfilesdir}/radvd.conf
|
||||
%{_sysusersdir}/radvd.conf
|
||||
%dir %attr(755,radvd,radvd) /run/radvd/
|
||||
%doc radvd.conf.example
|
||||
%{_mandir}/*/*
|
||||
@ -99,18 +94,63 @@ exit 0
|
||||
%{_sbindir}/radvdump
|
||||
|
||||
%changelog
|
||||
* Wed Apr 15 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.17-15
|
||||
- Fix double-free scenario (#1669177)
|
||||
* Thu Nov 03 2022 Martin Osvald <mosvald@redhat.com> - 2.19-5
|
||||
- Use systemd-sysusers for radvd user and group (#2095457)
|
||||
|
||||
* Fri Oct 25 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-14
|
||||
- Resolves: #1710787 - Change location of tmpfiles
|
||||
- Use tmpfile config from tarball
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.19-4
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Tue Dec 4 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-12
|
||||
- Resolves: #1652459 - Wait for all devices to be initialized
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.19-3
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Aug 28 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-11
|
||||
- Related: #1602675 - Fix memory leak in add_ra flow
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Oct 19 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.19-1
|
||||
- new version v2.19
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 2.18-5
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
|
||||
* Fri Apr 3 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.18-4
|
||||
- Update pidfile path (#1785862)
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Wed Feb 20 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-19
|
||||
- change tmpfiles location (#1678147)
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sun Jan 27 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-17
|
||||
- Fix double-free in InterfaceList
|
||||
|
||||
* Tue Nov 27 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-16
|
||||
- Depends on network-online target (#1652459)
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Jun 13 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-14
|
||||
- Log to stderr in non-daemon mode
|
||||
- Add nodaemon option into manpage
|
||||
- Re-enable test again
|
||||
|
||||
* Mon Jun 04 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-12
|
||||
- Enable tests and fix them on big endian arches
|
||||
|
||||
* Thu Apr 12 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-11
|
||||
- Enable Werror=all
|
||||
|
||||
* Mon Feb 19 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-10
|
||||
- Add gcc BR
|
3
radvd.sysusers
Normal file
3
radvd.sysusers
Normal file
@ -0,0 +1,3 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g radvd 75
|
||||
u radvd 75 "radvd user" / /sbin/nologin
|
Loading…
Reference in New Issue
Block a user