aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 70fa36554c14..f20561ff4528 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -60,7 +60,7 @@
60#endif 60#endif
61 61
62int core_uses_pid; 62int core_uses_pid;
63char core_pattern[128] = "core"; 63char core_pattern[CORENAME_MAX_SIZE] = "core";
64int suid_dumpable = 0; 64int suid_dumpable = 0;
65 65
66EXPORT_SYMBOL(suid_dumpable); 66EXPORT_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
1265EXPORT_SYMBOL(set_binfmt); 1268EXPORT_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.