Compare commits

...

No commits in common. "factory" and "factory" have entirely different histories.

6 changed files with 3 additions and 53 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
.osc

View File

@ -1,35 +0,0 @@
From 3cb58bb51d47b8e61611350324b751eaa46166a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
Date: Fri, 8 Nov 2024 08:28:12 +0100
Subject: [PATCH] Allow getrandom, rseq, and prctl for glibc malloc
glibc uses getrandom in malloc, rseq, and prctl in various other
places, allow these syscalls in seccomp filter.
```
export GLIBC_TUNABLES=glibc.mem.decorate_maps=1
make check
```
Signed-off-by: Werner Fink <werner@suse.de>
---
src/seccomp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/seccomp.c b/src/seccomp.c
index ce824330..8a2c8a4c 100644
--- a/src/seccomp.c
+++ b/src/seccomp.c
@@ -80,6 +80,9 @@ enable_sandbox(void)
if (ctx == NULL)
return -1;
+ ALLOW_RULE(prctl);
+ ALLOW_RULE(getrandom);
+ ALLOW_RULE(rseq);
ALLOW_RULE(access);
ALLOW_RULE(brk);
ALLOW_RULE(close);
--
2.43.0

View File

@ -1,9 +1,3 @@
-------------------------------------------------------------------
Thu Nov 7 20:11:48 UTC 2024 - Cristian Rodríguez <crrodriguez@opensuse.org>
- file-seccomp.patch: glibc uses getrandom in malloc, rseq and prctl
in various other places, allow these syscalls in seccomp filter.
-------------------------------------------------------------------
Mon Feb 26 09:11:40 UTC 2024 - Dr. Werner Fink <werner@suse.de>

View File

@ -65,7 +65,6 @@ Patch37: file-secure_getenv.patch
Patch39: file-5.28-btrfs-image.dif
# PATCH-FIX-UPSTREAM: Support max time_t on 32bit
Patch42: file-5.45-type_t.dif
Patch43: file-seccomp.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global magicdir %{_datadir}/file
@ -130,7 +129,6 @@ to develop applications that require the magic "file" interface.
%patch -P 37 -p1 -b .getenv
%patch -P 39 -p1 -b .btrfs
%patch -P 0 -b .0
%patch -P 43 -p1 -b .seccomp
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
rm -fv src/magic.h
@ -164,8 +162,6 @@ install -s dcore %{buildroot}%{_bindir}
rm -f %{buildroot}%{_libdir}/*.la
%check
# Test if prctl is still allowed by the seccomp filter.
export GLIBC_TUNABLES=glibc.mem.decorate_maps=1
# Standard checks
make check
# Check out that the binary does not bail out:
@ -178,7 +174,6 @@ for dir in %{_bindir} /%{_lib} %{_libdir} ; do
xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
done
unset LD_LIBRARY_PATH
unset GLIBC_TUNABLES
%post -n %libname -p /sbin/ldconfig

View File

@ -1,8 +1,3 @@
-------------------------------------------------------------------
Fri Aug 9 14:18:25 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Don't use `setup.py test`, that is now not allowed.
-------------------------------------------------------------------
Thu May 4 14:15:38 UTC 2023 - Frederic Crozat <fcrozat@suse.com>

View File

@ -60,7 +60,9 @@ popd
export LC_ALL=C.UTF-8
pushd python
%python_flavored_alternatives
%pyunittest -v tests
%{python_expand # indicate a writeable .pth directory for tests
python%{$python_version} setup.py test
}
popd
%files %{python_files}