Compare commits
3 Commits
Author | SHA256 | Date | |
---|---|---|---|
dced9256c4 | |||
fa86c6d21b | |||
6f2e529915 |
39
file-5.46-tcgets2.patch
Normal file
39
file-5.46-tcgets2.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 7b23bd3f87069fcebc9173c8d1637c2a2e1a12d1 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Wed, 6 Aug 2025 23:11:10 +0200
|
||||
Subject: [PATCH] Extend seccomp for glibc and physical terminals
|
||||
|
||||
New glibc implementations might also use TCGETS2 instead of TCGETS.
|
||||
This happens on current Arch Linux systems. Allow TCGETS2 in seccomp
|
||||
sandbox as well.
|
||||
---
|
||||
src/seccomp.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/seccomp.c b/src/seccomp.c
|
||||
index f05c30f9..dddb821c 100644
|
||||
--- a/src/seccomp.c
|
||||
+++ b/src/seccomp.c
|
||||
!@@ -37,6 +37,8 @@ FILE_RCSID("@(#)$File: seccomp.c,v 1.31 2025/03/20 14:57:41 christos Exp $")
|
||||
! #ifdef __powerpc64__
|
||||
! // See: https://sourceware.org/bugzilla/show_bug.cgi?id=32806
|
||||
! # include <asm/termbits.h>
|
||||
!+#elif defined __linux__
|
||||
!+# include <linux/termios.h>
|
||||
! #else
|
||||
! # include <termios.h>
|
||||
! #endif
|
||||
@@ -121,6 +123,10 @@ enable_sandbox(void)
|
||||
#ifdef TCGETS
|
||||
// glibc may call ioctl TCGETS on stdout on physical terminal
|
||||
ALLOW_IOCTL_RULE(TCGETS);
|
||||
+#endif
|
||||
+#ifdef TCGETS2
|
||||
+ // glibc may call ioctl TCGETS2 on stdout on physical terminal
|
||||
+ ALLOW_IOCTL_RULE(TCGETS2);
|
||||
#endif
|
||||
ALLOW_RULE(lseek);
|
||||
ALLOW_RULE(_llseek);
|
||||
--
|
||||
2.50.1
|
||||
|
@@ -11,18 +11,14 @@ correct value of TCGETS aka _IOR('t', 19, struct termios).
|
||||
diff --git a/src/seccomp.c b/src/seccomp.c
|
||||
--- a/src/seccomp.c
|
||||
+++ b/src/seccomp.c
|
||||
@@ -33,9 +33,13 @@ FILE_RCSID("@(#)$File: seccomp.c,v 1.29
|
||||
@@ -33,9 +33,9 @@ FILE_RCSID("@(#)$File: seccomp.c,v 1.29
|
||||
#if HAVE_LIBSECCOMP
|
||||
#include <seccomp.h> /* libseccomp */
|
||||
#include <sys/prctl.h> /* prctl */
|
||||
-#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
-#include <termios.h>
|
||||
+#ifdef __powerpc64__
|
||||
+# include <asm/termbits.h>
|
||||
+#else
|
||||
+# include <termios.h>
|
||||
+#endif
|
||||
+#include <asm/termbits.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 09:29:33 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch file-5.46-tcgets2.patch from https://bugs.astron.com/view.php?id=678
|
||||
but disable hunk 1 to avoid conflict with file-seccomp-ppc.patch
|
||||
This should fix bug boo#1249071
|
||||
- Modify patch file-seccomp-ppc.patch that is use <asm/termbits.h>
|
||||
on all architectures
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 25 06:23:18 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
|
@@ -68,6 +68,7 @@ Patch42: boo1237209.patch
|
||||
Patch43: file-seccomp.patch
|
||||
Patch44: file-seccomp-ppc.patch
|
||||
Patch45: file-zipdata.patch
|
||||
Patch46: file-5.46-tcgets2.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global _sysconfdir /etc
|
||||
%global magicdir %{_datadir}/file
|
||||
@@ -135,6 +136,7 @@ to develop applications that require the magic "file" interface.
|
||||
%patch -P 43 -p1 -b .seccomp
|
||||
%patch -P 44 -p1 -b .ppc
|
||||
%patch -P 45 -p1 -b .zipdata
|
||||
%patch -P 46 -p1 -b .tcgets2
|
||||
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
|
||||
rm -fv src/magic.h
|
||||
|
||||
|
Reference in New Issue
Block a user