diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -60,7 +60,7 @@ | |||
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | int core_uses_pid; | 62 | int core_uses_pid; |
63 | char core_pattern[128] = "core"; | 63 | char core_pattern[CORENAME_MAX_SIZE] = "core"; |
64 | int suid_dumpable = 0; | 64 | int suid_dumpable = 0; |
65 | 65 | ||
66 | EXPORT_SYMBOL(suid_dumpable); | 66 | EXPORT_SYMBOL(suid_dumpable); |
@@ -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; |
@@ -1264,8 +1267,6 @@ int set_binfmt(struct linux_binfmt *new) | |||
1264 | 1267 | ||
1265 | EXPORT_SYMBOL(set_binfmt); | 1268 | EXPORT_SYMBOL(set_binfmt); |
1266 | 1269 | ||
1267 | #define CORENAME_MAX_SIZE 64 | ||
1268 | |||
1269 | /* format_corename will inspect the pattern parameter, and output a | 1270 | /* format_corename will inspect the pattern parameter, and output a |
1270 | * name into corename, which must have space for at least | 1271 | * name into corename, which must have space for at least |
1271 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. | 1272 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. |