feat: add support for go

This commit is contained in:
Paul Pan 2024-04-27 21:21:43 +08:00
parent ed1bbfd893
commit 57ea5e13c8
4 changed files with 6 additions and 3 deletions

2
.idea/.gitignore vendored
View File

@ -6,3 +6,5 @@
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# GitHub Copilot persisted chat sessions
/copilot/chatSessions

View File

@ -5,9 +5,8 @@ if [ -d ./libseccomp ]; then exit 0; fi
set -x
git clone https://github.com/seccomp/libseccomp.git >/dev/null 2>&1 || exit 1
git clone -b "$VERSION" https://github.com/seccomp/libseccomp.git >/dev/null 2>&1 || exit 1
cd libseccomp || exit 1
git checkout $VERSION >/dev/null 2>&1
./autogen.sh >/dev/null 2>&1 || exit 1
./configure --enable-shared=no >/dev/null 2>&1 || exit 1
make -j >/dev/null 2>&1 || exit 1

View File

@ -8,8 +8,11 @@ void setup_lang_go(scmp_filter_ctx ctx) {
SCMP_SYS(rt_sigprocmask), // 14
SCMP_SYS(madvise), // 28
SCMP_SYS(clone), // 56
SCMP_SYS(fcntl), // 72
SCMP_SYS(getrlimit), // 97
SCMP_SYS(sigaltstack), // 131
SCMP_SYS(gettid), // 186
SCMP_SYS(futex), // 202
SCMP_SYS(sched_getaffinity), // 204
};
ADD_RULE_LIST(white, SCMP_ACT_ALLOW);

View File

@ -46,7 +46,6 @@ void setup_common(scmp_filter_ctx ctx, const char *exe_path) {
SCMP_SYS(exit_group), // 231
SCMP_SYS(newfstatat), // 262
SCMP_SYS(getrandom), // 318
};
ADD_RULE_LIST(white, SCMP_ACT_ALLOW);
}