Revert "ANDROID: inode_owner_or_capable called during execv"

This reverts commit 710cc7493c as it
causes massive merge issues with 5.11-rc1.

If needed, please bring it back.

Cc: Mark Salyzyn <salyzyn@google.com>
Cc: John Stultz <john.stultz@linaro.org>
Bug: 169988379
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I24d2a761c537d845cfaabcc89af3a5775ff6a94b
This commit is contained in:
Greg Kroah-Hartman
2020-12-21 10:29:33 +01:00
parent 7b889bd062
commit 0f9512bdd2

View File

@@ -53,7 +53,7 @@ static struct file *ovl_open_realfile(const struct file *file,
err = inode_permission(realinode, MAY_OPEN | acc_mode);
if (err) {
realfile = ERR_PTR(err);
} else if (old_cred && !inode_owner_or_capable(realinode)) {
} else if (!inode_owner_or_capable(realinode)) {
realfile = ERR_PTR(-EPERM);
} else {
realfile = open_with_fake_path(&file->f_path, flags, realinode,