[PATCH] TRIVIAL 2.5.8: clean up fs_exec.c

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Sun Apr 21 2002 - 22:47:20 EST


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

(Included in 2.4)
--- trivial-2.5.8/fs/exec.c.orig Mon Apr 22 13:42:32 2002
+++ trivial-2.5.8/fs/exec.c Mon Apr 22 13:42:32 2002
@@ -978,8 +978,7 @@
         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);

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:30 EST