Commit 97f64253 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] clean up fs_exec.c

Martin Pool <mbp@samba.org>: trivial kernel patch -- clean up fs_exec.c:

(Included in 2.4)
parent d1194126
......@@ -978,8 +978,7 @@ int do_coredump(long signr, struct pt_regs * regs)
if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
goto fail;
memcpy(corename,"core.", 5);
corename[4] = '\0';
memcpy(corename,"core", 5); /* include trailing \0 */
if (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)
sprintf(&corename[4], ".%d", current->pid);
file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment