Package: universal-ctags Version: 0+git20200824-1.1 Followup-For: Bug #990784 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu impish ubuntu-patch Control: tags -1 patch
The former patch did not fix the issue for armhf. This follow-up patch appends a new patch to the debdiff to fix the issue in that platform as well. This was forwarded upstream at https://github.com/universal-ctags/ctags/pull/3125 Thanks for considering the patch. *** /tmp/tmpji1bibkw/universal-ctags_0+git20200824-1.1ubuntu1.debdiff diff -Nru universal-ctags-0+git20200824/debian/patches/0001-main-add-newfstatat-to-seccomp-rules.patch universal-ctags-0+git20200824/debian/patches/0001-main-add-newfstatat-to-seccomp-rules.patch --- universal-ctags-0+git20200824/debian/patches/0001-main-add-newfstatat-to-seccomp-rules.patch 1969-12-31 21:00:00.000000000 -0300 +++ universal-ctags-0+git20200824/debian/patches/0001-main-add-newfstatat-to-seccomp-rules.patch 2021-07-06 16:48:58.000000000 -0300 @@ -0,0 +1,36 @@ +From f827e85fdee9bc438d3d28612c99478f9957e612 Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO <yam...@redhat.com> +Date: Sun, 2 May 2021 02:18:35 +0900 +Subject: [PATCH] main: add newfstatat to seccomp rules + +Close #2894. + +Signed-off-by: Masatake YAMATO <yam...@redhat.com> + +Origin: backport, https://github.com/universal-ctags/ctags/commit/f827e85fdee9bc438d3d28612c99478f9957e612 +Bug: https://github.com/universal-ctags/ctags/issues/2894 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990784 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/universal-ctags/+bug/1934829 +Last-Update: 2021-07-05 + +--- + main/seccomp.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/main/seccomp.c b/main/seccomp.c +index 12e60982..27e704ea 100644 +--- a/main/seccomp.c ++++ b/main/seccomp.c +@@ -43,6 +43,9 @@ int installSyscallFilter (void) + // The bowels of stdio want to know the size of a file, even for stdout. + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (fstat), 0); + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (fstat64), 0); ++#ifdef __SNR_newfstatat ++ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (newfstatat), 0); ++#endif + + // seems unnecessary, but this comes from + // main/parse.c:2764 : tagFilePosition (&tagfpos); +-- +2.25.1 + diff -Nru universal-ctags-0+git20200824/debian/patches/0002-main-add-statx-to-seccomp-rules.patch universal-ctags-0+git20200824/debian/patches/0002-main-add-statx-to-seccomp-rules.patch --- universal-ctags-0+git20200824/debian/patches/0002-main-add-statx-to-seccomp-rules.patch 1969-12-31 21:00:00.000000000 -0300 +++ universal-ctags-0+git20200824/debian/patches/0002-main-add-statx-to-seccomp-rules.patch 2021-07-06 16:48:58.000000000 -0300 @@ -0,0 +1,19 @@ +Author: Athos Ribeiro <athos.ribe...@canonical.com> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990784 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/universal-ctags/+bug/1934829 +Description: Add statx to seccomp rules as a fallback for newfstatat +Forwarded: https://github.com/universal-ctags/ctags/pull/3125 +Last-Update: 2021-08-18 +--- a/main/seccomp.c ++++ b/main/seccomp.c +@@ -46,6 +46,10 @@ + #ifdef __SNR_newfstatat + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (newfstatat), 0); + #endif ++#ifdef __SNR_statx ++ // armhf fallback ++ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (statx), 0); ++#endif + + // seems unnecessary, but this comes from + // main/parse.c:2764 : tagFilePosition (&tagfpos); diff -Nru universal-ctags-0+git20200824/debian/patches/series universal-ctags-0+git20200824/debian/patches/series --- universal-ctags-0+git20200824/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 +++ universal-ctags-0+git20200824/debian/patches/series 2021-07-06 16:48:58.000000000 -0300 @@ -0,0 +1,2 @@ +0001-main-add-newfstatat-to-seccomp-rules.patch +0002-main-add-statx-to-seccomp-rules.patch -- System Information: Debian Release: 11.0 APT prefers impish APT policy: (500, 'impish') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.11.0-25-generic (SMP w/16 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -- Athos Ribeiro