Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42761
b: refs/heads/master
c: 317a40a
h: refs/heads/master
i:
  42759: 58cb65a
v: v3
  • Loading branch information
Stas Sergeev authored and Linus Torvalds committed Dec 7, 2006
1 parent 471ab8b commit ed8c42c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed07536ed6731775219c1df7fa26a7588753e693
refs/heads/master: 317a40ac2237732aba531eee2c7b5e39dd40e959
6 changes: 4 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ int permission(struct inode *inode, int mask, struct nameidata *nd)

/*
* MAY_EXEC on regular files requires special handling: We override
* filesystem execute permissions if the mode bits aren't set.
* filesystem execute permissions if the mode bits aren't set or
* the fs is mounted with the "noexec" flag.
*/
if ((mask & MAY_EXEC) && S_ISREG(mode) && !(mode & S_IXUGO))
if ((mask & MAY_EXEC) && S_ISREG(mode) && (!(mode & S_IXUGO) ||
(nd && nd->mnt && (nd->mnt->mnt_flags & MNT_NOEXEC))))
return -EACCES;

/* Ordinary permission routines do not understand MAY_APPEND. */
Expand Down

0 comments on commit ed8c42c

Please sign in to comment.