| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
struct userns_restrict_bpf; |
| 7 |
|
| 8 |
int userns_restrict_install(bool pin, struct userns_restrict_bpf **ret); |
| 9 |
struct userns_restrict_bpf *userns_restrict_bpf_free(struct userns_restrict_bpf *obj); |
| 10 |
|
| 11 |
int userns_restrict_put_by_fd(struct userns_restrict_bpf *obj, int userns_fd, bool replace, const int mount_fds[], size_t n_mount_fds); |
| 12 |
int userns_restrict_put_by_inode(struct userns_restrict_bpf *obj, uint64_t userns_inode, bool replace, const int mount_fds[], size_t n_mount_fds); |
| 13 |
|
| 14 |
int userns_restrict_reset_by_inode(struct userns_restrict_bpf *obj, uint64_t userns_inode); |
| 15 |
|
| 16 |
int userns_restrict_setgroups_deny_by_fd(struct userns_restrict_bpf *obj, int userns_fd); |
| 17 |
int userns_restrict_setgroups_deny_by_inode(struct userns_restrict_bpf *obj, uint64_t userns_inode); |
| 18 |
|
| 19 |
DEFINE_TRIVIAL_CLEANUP_FUNC(struct userns_restrict_bpf*, userns_restrict_bpf_free); |