hakurei/container/landlock/landlock-helper.c
Clayton Gilmer 141bec290b
Some checks failed
Test / Sandbox (race detector) (push) Failing after 1m45s
Test / Sandbox (pull_request) Successful in 2m4s
Test / Sandbox (push) Successful in 2m20s
Test / Sandbox (race detector) (pull_request) Failing after 2m12s
Test / Hakurei (race detector) (push) Failing after 3m52s
Test / Hakurei (push) Failing after 20m54s
Test / Flake checks (push) Has been skipped
Test / Hpkg (push) Successful in 4m16s
Test / Create distribution (push) Failing after 32s
Test / Hpkg (pull_request) Successful in 3m12s
Test / Hakurei (race detector) (pull_request) Failing after 4m43s
Test / Hakurei (pull_request) Failing after 39m47s
Test / Flake checks (pull_request) Has been skipped
Test / Create distribution (pull_request) Failing after 29s
container: optionally isolate host abstract UNIX domain sockets via landlock
2025-08-17 17:36:51 +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;
}