diff options
-rw-r--r-- | fs/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -134,6 +134,9 @@ asmlinkage long sys_uselib(const char __user * library) | |||
134 | if (error) | 134 | if (error) |
135 | goto out; | 135 | goto out; |
136 | 136 | ||
137 | error = -EACCES; | ||
138 | if (nd.mnt->mnt_flags & MNT_NOEXEC) | ||
139 | goto exit; | ||
137 | error = -EINVAL; | 140 | error = -EINVAL; |
138 | if (!S_ISREG(nd.dentry->d_inode->i_mode)) | 141 | if (!S_ISREG(nd.dentry->d_inode->i_mode)) |
139 | goto exit; | 142 | goto exit; |