[Devel] [PATCH RHEL8 COMMIT] ve/fs/autofs: Allow autofs to be used inside a container
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Apr 20 14:52:41 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.17
------>
commit 8427a6d9a58be615656f6de08bba56dccad12ae0
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Tue Apr 20 14:52:41 2021 +0300
ve/fs/autofs: Allow autofs to be used inside a container
It turned out that autofs is used at least for NFS/CIFS and binfmt_misc.
Let's use new FS_VE_MOUNT flag to only allow autofs mounts in
conainer-init userns, which would mimic mainstream host behaviour.
https://jira.sw.ru/browse/PSBM-26968
https://jira.sw.ru/browse/PSBM-86138
https://jira.sw.ru/browse/PSBM-128649
Rebase from VZ7, with use of FS_VE_MOUNT and with comment cleanup:
vz7 commits:
83c27c7bffcc1 ("ve/fs/autofs: mark autofs as virtualized")
0045b317c97b ("ve/fs/autofs: allow to mount autofs inside non-root userns")
Fixes: 7ddb6e8dd9f6 ("fs: Mask appropriate filesystems FS_VIRTUALIZED")
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
fs/autofs/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/autofs/init.c b/fs/autofs/init.c
index 99bb56d42907..e502b0c0d215 100644
--- a/fs/autofs/init.c
+++ b/fs/autofs/init.c
@@ -21,7 +21,7 @@ struct file_system_type autofs_fs_type = {
.name = "autofs",
.mount = autofs_mount,
.kill_sb = autofs_kill_sb,
- .fs_flags = FS_VIRTUALIZED,
+ .fs_flags = FS_VIRTUALIZED | FS_VE_MOUNT,
};
MODULE_ALIAS_FS("autofs");
MODULE_ALIAS("autofs");
More information about the Devel
mailing list