Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 045528cd43c9d57ab2eafd1523764c60038079f6 Mon Sep 17 00:00:00 2001
From: Duncan Overbruck <mail@duncano.de>
Date: Wed, 22 Jul 2026 00:01:43 +0200
Subject: [PATCH] sandbox: fix seccomp sandbox with musl libc

musl uses readv and writev for stdio read and writes, so allow them like
normal read and write.

musl also checks whether stdout is a tty when writing to stdout, for
that it uses ioctl with TIOCGWINSZ.

https://git.musl-libc.org/cgit/musl/commit/?id=2de85a985654d2c944931267645d9a0686242dfe
---
main/seccomp.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/main/seccomp.c b/main/seccomp.c
index d60133d45..f44da3c5a 100644
--- a/main/seccomp.c
+++ b/main/seccomp.c
@@ -15,6 +15,7 @@

#ifdef HAVE_SECCOMP
#include <seccomp.h>
+#include <sys/ioctl.h>


int installSyscallFilter (void)
@@ -34,7 +35,14 @@ int installSyscallFilter (void)

// I/O
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (read), 0);
+ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (readv), 0);
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (write), 0);
+ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (writev), 0);
+
+ // musl libc uses this to check whether stdout is a tty when writing to it
+ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (ioctl), 2,
+ SCMP_CMP (0, SCMP_CMP_EQ, 1), // fd == 1
+ SCMP_CMP (1, SCMP_CMP_EQ, TIOCGWINSZ)); // request == TIOCGWINSZ

// Clean exit
seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (exit), 0);
--
2.55.0

21 changes: 0 additions & 21 deletions srcpkgs/ctags/patches/disable-check-genfile.patch

This file was deleted.

10 changes: 5 additions & 5 deletions srcpkgs/ctags/template
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Template file for 'ctags'
pkgname=ctags
version=5.9.20221002.0
version=6.2.1
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config automake python3-docutils"
makedepends="jansson-devel libseccomp-devel libxml2-devel libyaml-devel
pcre2-devel"
makedepends="jansson-devel libxml2-devel libyaml-devel pcre2-devel libseccomp-devel"
short_desc="Generates an index file of language objects found in source files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://ctags.io/"
distfiles="https://github.com/universal-ctags/ctags/archive/p${version}.tar.gz"
checksum=d2b2b382f8035d4bdfb73a2f6995e85c744bc8121135e0f77060d2429ec459bd
changelog="https://github.com/universal-ctags/ctags/releases"
distfiles="https://github.com/universal-ctags/ctags/archive/refs/tags/v${version}.tar.gz"
checksum=f56829e9a576025e98955597ee967099a871987b3476fbd8dbbc2b9dc921f824

pre_configure() {
./autogen.sh
Expand Down