hakurei/container/landlock/landlock-helper.c
Clayton Gilmer c809e9bd7c
Some checks failed
Test / Hakurei (pull_request) Failing after 1h6m59s
Test / Hakurei (race detector) (pull_request) Failing after 1h9m52s
Test / Flake checks (pull_request) Has been skipped
Test / Create distribution (push) Failing after 32s
Test / Create distribution (pull_request) Failing after 30s
Test / Sandbox (race detector) (push) Successful in 45s
Test / Sandbox (push) Successful in 45s
Test / Hpkg (push) Successful in 46s
Test / Sandbox (pull_request) Successful in 44s
Test / Sandbox (race detector) (pull_request) Successful in 43s
Test / Hpkg (pull_request) Successful in 44s
Test / Hakurei (race detector) (push) Failing after 30m58s
Test / Hakurei (push) Failing after 48m2s
Test / Flake checks (push) Has been skipped
container: optionally isolate host abstract UNIX domain sockets via landlock
2025-08-17 16:16:52 +09:00

15 lines
298 B
C

#include <errno.h>
#include <linux/landlock.h>
#include <sys/psx_syscall.h>
#include <sys/syscall.h>
#include "landlock-helper.h"
int hakurei_scope_abstract_unix_sockets(int* p_errno, int fd) {
int res = psx_syscall3(SYS_landlock_restrict_self, fd, 0, 0);
*p_errno = errno;
return res;
}