projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be6da62
)
jail: cgroup hack: rewrite cgroup -> cgroup2
author
Daniel Golle
<
[email protected]
>
Wed, 28 Oct 2020 13:06:07 +0000
(13:06 +0000)
committer
Daniel Golle
<
[email protected]
>
Sat, 21 Nov 2020 01:13:13 +0000
(
01:13
+0000)
"I'm sure you said cgroup2"
Signed-off-by: Daniel Golle <
[email protected]
>
jail/fs.c
patch
|
blob
|
history
diff --git
a/jail/fs.c
b/jail/fs.c
index 4cc273eea973386a7cea2091928295ab0d1c79af..d240daf7f44a75a076193ae719fa5d1dc655b12c 100644
(file)
--- a/
jail/fs.c
+++ b/
jail/fs.c
@@
-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);