hakurei/container/landlock/landlock-helper.c
Clayton Gilmer 55d8c3bacb
Some checks failed
Test / Create distribution (pull_request) Failing after 32s
Test / Hpkg (push) Has been cancelled
Test / Flake checks (push) Has been cancelled
Test / Create distribution (push) Has been cancelled
Test / Sandbox (push) Has started running
Test / Hakurei (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hakurei (pull_request) Failing after 3m7s
Test / Sandbox (pull_request) Failing after 3m27s
Test / Sandbox (race detector) (pull_request) Failing after 4m3s
Test / Hpkg (pull_request) Successful in 4m16s
Test / Hakurei (race detector) (pull_request) Failing after 5m7s
Test / Flake checks (pull_request) Has been skipped
container: optionally isolate host abstract UNIX domain sockets via landlock
2025-08-18 11:48:03 +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;
}