Message ID | 20211117015806.2192263-5-dvander@google.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Paul Moore |
Headers | show |
Series | overlayfs override_creds=off & nested get xattr fix | expand |
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 11d8277c94cd..586de55bba79 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -55,7 +55,8 @@ static struct file *ovl_open_realfile(const struct file *file, if (err) { realfile = ERR_PTR(err); } else { - if (!inode_owner_or_capable(&init_user_ns, realinode)) + if (old_cred && !inode_owner_or_capable(&init_user_ns, + realinode)) flags &= ~O_NOATIME; realfile = open_with_fake_path(&file->f_path, flags, realinode,