diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-12-04 17:57:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-04-06 16:08:24 +0200 |
commit | 54452c7b2aa03536331fc1ec04439c89d0320b57 (patch) | |
tree | e021c46a5c7cc27c76bb233bdf29e6dbc1b90d13 /src/shared/nsresource.h | |
parent | nsresourced: add new daemon for granting clients user namespaces and assignin... (diff) | |
download | systemd-54452c7b2aa03536331fc1ec04439c89d0320b57.tar.xz systemd-54452c7b2aa03536331fc1ec04439c89d0320b57.zip |
nsresourced: add client-side helpers around nsresourced APIs
This adds simple functions that wrap the Varlink IPC calls.
Diffstat (limited to 'src/shared/nsresource.h')
-rw-r--r-- | src/shared/nsresource.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/nsresource.h b/src/shared/nsresource.h new file mode 100644 index 0000000000..6b807b327b --- /dev/null +++ b/src/shared/nsresource.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include <inttypes.h> + +int nsresource_allocate_userns(const char *name, uint64_t size); +int nsresource_register_userns(const char *name, int userns_fd); +int nsresource_add_mount(int userns_fd, int mount_fd); +int nsresource_add_cgroup(int userns_fd, int cgroup_fd); +int nsresource_add_netif(int userns_fd, int netns_fd, const char *namespace_ifname, char **ret_host_ifname, char **ret_namespace_ifname); |