diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-06-14 13:32:18 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-06-16 18:52:04 -0400 |
commit | a2c5a0f3e0f005899fd6de214ff0525b7415cb8a (patch) | |
tree | 8394b4d9e63233ec428d5d77a798feeda6658c23 /src/nspawn/nspawn-cgroup.h | |
parent | 76b7be5e7e8bd15b549aa12eabbe3a36fdc4e924 (diff) |
nspawn: Divorce the code deciding the cgroup mounts from the code performing them
TODO: a better commit message
Diffstat (limited to 'src/nspawn/nspawn-cgroup.h')
-rw-r--r-- | src/nspawn/nspawn-cgroup.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-cgroup.h b/src/nspawn/nspawn-cgroup.h index e677766726..46c669c446 100644 --- a/src/nspawn/nspawn-cgroup.h +++ b/src/nspawn/nspawn-cgroup.h @@ -24,7 +24,13 @@ #include "cgroup-util.h" -int cgroup_setup(pid_t pid, CGroupUnified outer_cgver, CGroupUnified inner_cgver, uid_t uid_shift); +typedef struct CGMount CGMount; +typedef struct CGMounts { + CGMount *mounts; + size_t n; +} CGMounts; -int mount_cgroups(const char *dest, CGroupUnified outer_cgver, CGroupUnified inner_cgver, bool userns, uid_t uid_shift, uid_t uid_range, const char *selinux_apifs_context, bool use_cgns); -int mount_systemd_cgroup_writable(const char *dest, CGroupUnified inner_cgver); +int cgroup_setup(pid_t pid, CGroupUnified outer_cgver, CGroupUnified inner_cgver, uid_t uid_shift); +int cgroup_decide_mounts(CGMounts *ret_mounts, CGroupUnified outer_cgver, CGroupUnified inner_cgver, bool use_cgns); +int cgroup_mount_mounts(CGMounts mounts, FILE *cgfile, uid_t uid_shift, const char *selinux_apifs_context); +void cgroup_free_mounts(CGMounts *mounts); |