When I run fam as root and I have the TMPDIR environment variable set to
/root/tmp, fam creates it's temporary file /tmp/.famXXXXX in
/root/tmp/.famXXXXX so any client that connects won't work. I take it
the client needs to be able to access the .tmp file too? I had this
problem with efsd as the client. The following patch removes the TMPDIR
environment variable from fam's running environment before creating the
tmp file name and fixes the problem..
diff -Naur fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-1tp/fam/Listener.c++
--- fam-oss-2.6.4/fam/Listener.c++ Sat May 20 00:46:31 2000
+++ fam-oss-2.6.4-1tp/fam/Listener.c++ Tue Jul 10 21:30:08 2001
@@ -201,6 +201,10 @@
// inet socket for communication. Create the new socket owned by the
// requested user and pass the name back to the client.
+
+ //remove the tmpdir environment variable so the tempnam() function won't
screw up
+ unsetenv("TMPDIR");
+
char *tmpfile = tempnam("/tmp", ".fam");
sockaddr_un sun = { AF_UNIX, "" };
if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
|