hakurei/container/landlock/landlock-helper.c
Clayton Gilmer 2de7c2d07d
Some checks failed
Test / Sandbox (push) Successful in 2m17s
Test / Hakurei (race detector) (pull_request) Failing after 1h0m59s
Test / Flake checks (pull_request) Has been skipped
Test / Sandbox (pull_request) Successful in 1m29s
Test / Hpkg (push) Successful in 4m12s
Test / Hpkg (pull_request) Successful in 1m56s
Test / Sandbox (race detector) (push) Successful in 4m17s
Test / Sandbox (race detector) (pull_request) Successful in 2m5s
Test / Create distribution (pull_request) Failing after 28s
Test / Hakurei (pull_request) Failing after 20m30s
Test / Hakurei (race detector) (push) Failing after 22m21s
Test / Hakurei (push) Failing after 39m46s
Test / Flake checks (push) Has been skipped
Test / Create distribution (push) Failing after 46s
container: optionally isolate host abstract UNIX domain sockets via landlock
2025-08-17 16:05:49 +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;
}