]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/exec.c
fs: Treat foreign mounts as nosuid
[people/ms/linux.git] / fs / exec.c
index 887c1c955df8264efc43bd0964f971ac8c107f34..ca239fc86d8d0acd5446d754ff341e2d4d4613cb 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1411,7 +1411,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm)
        bprm->cred->euid = current_euid();
        bprm->cred->egid = current_egid();
 
-       if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID)
+       if (!mnt_may_suid(bprm->file->f_path.mnt))
                return;
 
        if (task_no_new_privs(current))