Compare commits

...

No commits in common. 'c9' and 'i10c-beta' have entirely different histories.

@ -0,0 +1,25 @@
From a9e6f292f4ce9443ee95c77c60dd8da68d0db7e9 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Wed, 6 Sep 2023 12:27:47 +0200
Subject: [PATCH] numad_log: fix buffer overflow
---
numad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/numad.c b/numad.c
index 4c85486..2923842 100644
--- a/numad.c
+++ b/numad.c
@@ -153,7 +153,7 @@ void numad_log(int level, const char *fmt, ...) {
*p++ = ' ';
va_list ap;
va_start(ap, fmt);
- vsnprintf(p, BUF_SIZE, fmt, ap);
+ vsnprintf(p, BUF_SIZE - strlen(buf) , fmt, ap);
va_end(ap);
fprintf(log_fs, "%s", buf);
fflush(log_fs);
--
2.39.2

@ -0,0 +1,19 @@
commit cf6c2c029edc9c288122bcd603a72eb7f6d042d2
Author: Jan Synacek <jsynacek@redhat.com>
Date: Mon Oct 30 11:37:45 2017 +0100
recognize -m option correctly
diff --git a/numad.c b/numad.c
index 4c85486..0721af4 100644
--- a/numad.c
+++ b/numad.c
@@ -2395,7 +2395,7 @@ int main(int argc, char *argv[]) {
int x_flag = 0;
int tmp_int = 0;
long list_pid = 0;
- while ((opt = getopt(argc, argv, "C:dD:hH:i:K:l:p:r:R:S:t:u:vVw:x:")) != -1) {
+ while ((opt = getopt(argc, argv, "C:dD:hH:i:K:l:m:p:r:R:S:t:u:vVw:x:")) != -1) {
switch (opt) {
case 'C':
C_flag = 1;

@ -1,27 +1,23 @@
%global systemctl_bin /usr/bin/systemctl
Name: numad Name: numad
Version: 0.5 Version: 0.5
Release: 36.20150602git%{?dist} Release: 45.20150602git%{?dist}
Summary: NUMA user daemon Summary: NUMA user daemon
License: LGPLv2 License: LGPL-2.1-only
URL: https://pagure.io/numad URL: https://pagure.io/numad
# The source for this package was pulled from upstream's vcs. Use the # The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball: # following commands to generate the tarball:
# git clone https://pagure.io/numad.git numad-0.5git # git clone https://pagure.io/numad.git numad-0.5git
# tar --exclude-vcs -cJf numad-0.5git.tar.xz numad-0.5git/ # tar --exclude-vcs -cJf numad-0.5git.tar.xz numad-0.5git/
Source0: %{name}-%{version}git.tar.xz Source0: %{name}-%{version}git.tar.xz
Patch0: 0000-remove-conf.patch Patch0: 0000-remove-conf.patch
Patch1: 0001-numad_log-fix-buffer-overflow.patch
Patch2: 0002-recognize--m-option-correctly.patch
Requires: systemd-units BuildRequires: gcc
Requires(post): systemd-units
Requires(preun): systemd-units
BuildRequires: make BuildRequires: make
BuildRequires: gcc BuildRequires: systemd-rpm-macros
BuildRequires: systemd-units
ExcludeArch: s390 %{arm}
%description %description
Numad, a daemon for NUMA (Non-Uniform Memory Architecture) systems, Numad, a daemon for NUMA (Non-Uniform Memory Architecture) systems,
@ -29,26 +25,21 @@ that monitors NUMA characteristics and manages placement of processes
and memory to minimize memory latency and thus provide optimum performance. and memory to minimize memory latency and thus provide optimum performance.
%prep %prep
%setup -q -n %{name}-%{version}git %autosetup -n %{name}-%{version}git
%patch0 -p1
%build %build
make CFLAGS="$RPM_OPT_FLAGS -std=gnu99" LDFLAGS="$RPM_LD_FLAGS -lpthread -lrt -lm" %make_build CFLAGS="$CFLAGS"
%install %install
mkdir -p %{buildroot}%{_bindir} install -D -p -m 644 {,%{buildroot}%{_unitdir}/}numad.service
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d install -D -p -m 644 {,%{buildroot}%{_sysconfdir}/logrotate.d/%{name}/}numad.logrotate
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_mandir}/man8/
install -p -m 644 numad.service %{buildroot}%{_unitdir}/
install -p -m 644 numad.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%make_install prefix=%{buildroot}/usr %make_install prefix=%{buildroot}/usr
%files %files
%config(noreplace) %{_sysconfdir}/logrotate.d/numad
%{_bindir}/numad %{_bindir}/numad
%{_mandir}/man8/numad.8.*
%{_unitdir}/numad.service %{_unitdir}/numad.service
%config(noreplace) %{_sysconfdir}/logrotate.d/numad
%doc %{_mandir}/man8/numad.8.gz
%post %post
%systemd_post numad.service %systemd_post numad.service
@ -60,12 +51,47 @@ install -p -m 644 numad.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%systemd_postun numad.service %systemd_postun numad.service
%changelog %changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.5-36.20150602git * Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.5-45.20150602git
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for MSVSphere 10
Related: rhbz#1991688
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.5-45.20150602git
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-44.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-43.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 0.5-42.20150602git
- recognize the -m option
- modernize the specfile
- use recommended systemd macros
- fix manual pages installation
- sort file list and BuildRequires
- use modern make macros
- simplify %%install section
* Wed Sep 06 2023 Lukas Nykryn <lnykryn@redhat.com> - 0.5-41.20150602git
- fix buffer overflow
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-40.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Apr 13 2023 Lukáš Zaoral <lzaoral@redhat.com> - 0.5-39.20150602git
- migrate to SPDX license format
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-38.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-37.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-36.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.5-35.20150602git * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-35.20150602git
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-34.20150602git * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-34.20150602git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save