Date: Thu, 26 Nov 1998 22:45:46 -0200 (EDT)
From: Marcelo Tosatti <[email protected]>
To: [email protected]Subject: Gated 3.5.10 tmp race
Sorry if this is already known.
When "gdc dump" is called, it will send a signal (or whatever) to gated,
and gated will dump some data to /tmp/gated_dump. Here is the workaround :
<->
diff -Nur gated-3-5-10.orig/src/trace.c gated-3-5-10/src/trace.c
--- gated-3-5-10.orig/src/trace.c Sun Nov 16 22:36:47 1997
+++ gated-3-5-10/src/trace.c Wed Nov 18 03:05:28 1998
@@ -1005,7 +1005,7 @@
#ifndef NO_STAT
struct stat stbuf;
- if (stat(path_dump, &stbuf) < 0) {
+ if (lstat(path_dump, &stbuf) < 0) {
switch (errno) {
case ENOENT:
break;
<->
Another possible problem in task.c :
/* Make dumps happen in a known place */
(void) task_chdir(_PATH_DUMPDIR);
...
by default, _PATH_DUMPDIR is /tmp.
Dangerous?
Marcelo Tosatti
Conectiva Informatica