diff options
-rw-r--r-- | fs/exec.c | 4 | ||||
-rw-r--r-- | include/linux/binfmts.h | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 2 |
3 files changed, 4 insertions, 4 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); |
@@ -1264,8 +1264,6 @@ int set_binfmt(struct linux_binfmt *new) | |||
1264 | 1264 | ||
1265 | EXPORT_SYMBOL(set_binfmt); | 1265 | EXPORT_SYMBOL(set_binfmt); |
1266 | 1266 | ||
1267 | #define CORENAME_MAX_SIZE 64 | ||
1268 | |||
1269 | /* format_corename will inspect the pattern parameter, and output a | 1267 | /* format_corename will inspect the pattern parameter, and output a |
1270 | * name into corename, which must have space for at least | 1268 | * name into corename, which must have space for at least |
1271 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. | 1269 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 2d956cd566ae..e1a708337be3 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -17,6 +17,8 @@ struct pt_regs; | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #define CORENAME_MAX_SIZE 128 | ||
21 | |||
20 | /* | 22 | /* |
21 | * This structure is used to hold the arguments that are used when loading binaries. | 23 | * This structure is used to hold the arguments that are used when loading binaries. |
22 | */ | 24 | */ |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 4073353abd4f..30ee462ee79f 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -227,7 +227,7 @@ static ctl_table kern_table[] = { | |||
227 | .ctl_name = KERN_CORE_PATTERN, | 227 | .ctl_name = KERN_CORE_PATTERN, |
228 | .procname = "core_pattern", | 228 | .procname = "core_pattern", |
229 | .data = core_pattern, | 229 | .data = core_pattern, |
230 | .maxlen = 128, | 230 | .maxlen = CORENAME_MAX_SIZE, |
231 | .mode = 0644, | 231 | .mode = 0644, |
232 | .proc_handler = &proc_dostring, | 232 | .proc_handler = &proc_dostring, |
233 | .strategy = &sysctl_string, | 233 | .strategy = &sysctl_string, |