diff options
| author | Daniel Golle | 2020-07-16 12:14:51 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-07-16 12:14:51 +0000 |
| commit | bfce7d128d9121d566de1beae52e699b6e1192c8 (patch) | |
| tree | 8034587364f64150a11d5e3ce152a56738eb277a | |
| parent | 86a5105c81d93da7f41ca71ea82f5a479990da62 (diff) | |
| download | procd-bfce7d128d9121d566de1beae52e699b6e1192c8.tar.gz | |
jail: fix some more mount options
Make sure 'rbind' works as expected and add support for 'iversion' and
'noiversion' options.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/fs.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -104,7 +104,7 @@ static int do_mount(const char *root, const char *source, const char *target, co } if (mountflags & MS_BIND) { - if (mount(source, new, filesystemtype, MS_BIND, optstr)) { + if (mount(source, new, filesystemtype, MS_BIND | (mountflags & MS_REC), optstr)) { ERROR("failed to mount -B %s %s: %m\n", source, new); return error; } @@ -217,6 +217,10 @@ static int parseOCImountopts(struct blob_attr *msg, unsigned long *mount_flags, mf &= ~MS_NODEV; else if (!strcmp("nodev", tmp)) mf |= MS_NODEV; + else if (!strcmp("iversion", tmp)) + mf |= MS_I_VERSION; + else if (!strcmp("noiversion", tmp)) + mf &= ~MS_I_VERSION; else if (!strcmp("diratime", tmp)) mf &= ~MS_NODIRATIME; else if (!strcmp("nodiratime", tmp)) |