Commit 6d14b185 authored by Alexander Mikhalitsyn's avatar Alexander Mikhalitsyn Committed by Miklos Szeredi

fuse: warn if fuse_access is called when idmapped mounts are allowed

It is not possible with the current fuse code, but let's protect ourselves
from regressions in the future.
Signed-off-by: default avatarAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 5b8ca5a5
......@@ -1474,6 +1474,14 @@ static int fuse_access(struct inode *inode, int mask)
BUG_ON(mask & MAY_NOT_BLOCK);
/*
* We should not send FUSE_ACCESS to the userspace
* when idmapped mounts are enabled as for this case
* we have fc->default_permissions = 1 and access
* permission checks are done on the kernel side.
*/
WARN_ON_ONCE(!(fm->sb->s_iflags & SB_I_NOIDMAP));
if (fm->fc->no_access)
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment