I had similar problems on mdk80. It turned out to be the TMP
environment variable when logged in as root was pointing to /root/tmp.
When the client would connect (as a user), the tmp file fam creates
would be created in /root/tmp/ and the client would not be able to open
it. I fixed it by reseting the TMP variable in Listener.c++ before it
calls tempnam(). You can also remove the TMP variable from the
environment. Here's the fam patch I use to compile fam on my set:
Phil Morris wrote:
Hello,
I recently upgraded to Mandrake 8.1 and am having fam troubles again.
Here's a snapshot from /var/log/syslog whenever I try and connect using the
fam test or efsd from the e17 project.
I'm running fam 2.6.4 and xinetd 2.3.3 to control fam.
Oct 6 21:22:09 Warthog fam[10844]: log level is LOG_DEBUG
Oct 6 21:22:09 Warthog fam[10844]: read /etc/fam.conf line 13:
"insecure_compatibility" = "false"
Oct 6 21:22:09 Warthog fam[10844]: read /etc/fam.conf line 20:
"untrusted_user" = "nobody"
Oct 6 21:22:09 Warthog fam[10844]: read /etc/fam.conf line 28: "local_only"
= "false"
Oct 6 21:22:09 Warthog fam[10844]: read /etc/fam.conf line 35:
"xtab_verification" = "true"
Oct 6 21:22:09 Warthog fam[10844]: Setting untrusted-user to "nobody" (UID
99)
Oct 6 21:22:09 Warthog fam[10844]: listening for clients on descriptor 0
Oct 6 21:22:09 Warthog fam[10844]: could not enslave myself: Connection
refused
Oct 6 21:22:09 Warthog fam[10844]: fam (process 10844) is master fam.
Oct 6 21:22:09 Warthog fam[10844]: client fd 5 is local/untrusted.
Oct 6 21:22:09 Warthog fam[10844]: new connection from client 5
Oct 6 21:22:09 Warthog fam[10844]: client 5 said: client 5 is sockmeister,
and wants a unix domain socket
Oct 6 21:22:09 Warthog fam[10844]: client sockmeister said uid 502;
creating /root/tmp/.famf2dDym
Oct 6 21:22:09 Warthog fam[10844]: listening for requests for uid 502 on
descriptor 6 (/root/tmp/.famf2dDym)
Oct 6 21:22:09 Warthog fam[10844]: Shutting down connection
Oct 6 21:22:09 Warthog fam[10844]: lost connection from sockmeister
Does anyone have a fix for this.
Thanks Phil,
--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx
diff -Naur fam-oss-2.6.4/fam/IMonLinux.c++ fam-oss-2.6.4-1tp/fam/IMonLinux.c++
--- fam-oss-2.6.4/fam/IMonLinux.c++ Sat May 20 00:46:31 2000
+++ fam-oss-2.6.4-1tp/fam/IMonLinux.c++ Tue Jul 10 21:06:19 2001
@@ -27,6 +27,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
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))
diff -Naur fam-oss-2.6.4/include/BTree.h fam-oss-2.6.4-1tp/include/BTree.h
--- fam-oss-2.6.4/include/BTree.h Sat May 20 00:46:32 2000
+++ fam-oss-2.6.4-1tp/include/BTree.h Tue Jul 10 21:04:22 2001
@@ -23,6 +23,7 @@
#ifndef BTree_included
#define BTree_included
+#include <stdlib.h>
#include "Boolean.h"
// This is an in-core B-Tree implementation.
diff -Naur fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-1tp/test/test.c++
--- fam-oss-2.6.4/test/test.c++ Sat May 20 00:46:32 2000
+++ fam-oss-2.6.4-1tp/test/test.c++ Tue Jul 10 21:06:41 2001
@@ -1,6 +1,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
|