FROMLIST: overlayfs: inode_owner_or_capable called during execv
Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Bug: 204981027 Link: https://lore.kernel.org/lkml/20211117015806.2192263-5-dvander@google.com Change-Id: Ifa966dabda7413873614d1da24629dc8054db131 Signed-off-by: David Anderson <dvander@google.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com>
This commit is contained in:
parent
0792ff2e87
commit
5accf46108
|
@ -56,7 +56,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,
|
||||
|
|
Loading…
Reference in New Issue