diff options
| author | Daniel Golle | 2020-10-28 13:06:07 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-11-21 01:13:13 +0000 |
| commit | b22e6254df3a3502cc62154ae8e54fce7e3fa48b (patch) | |
| tree | 0ac5776f81bebda1a9797b2adecb136cf6dd19c9 | |
| parent | be6da628b18cd9567a09ab21d15102b7f5aa2490 (diff) | |
| download | procd-b22e6254df3a3502cc62154ae8e54fce7e3fa48b.tar.gz | |
jail: cgroup hack: rewrite cgroup -> cgroup2
"I'm sure you said cgroup2"
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -149,7 +149,8 @@ static int do_mount(const char *root, const char *orig_source, const char *targe mountflags |= MS_REMOUNT; } - if (mount(source?:(is_bind?new:NULL), new, filesystemtype, mountflags, optstr)) { + const char *hack_fstype = ((!filesystemtype || strcmp(filesystemtype, "cgroup"))?filesystemtype:"cgroup2"); + if (mount(source?:(is_bind?new:NULL), new, hack_fstype, mountflags, optstr)) { if (error) ERROR("failed to mount %s %s: %m\n", source, new); |