Re: [tkined] Scotty/Straps problem

Erik Schoenfelder (schoenfr@gaertner.de)
Wed, 10 Dec 1997 11:35:05 +0100 (MET)

Hi,

Richard> I am using Solaris 2.5 with Scotty 2.1.7 for an SNMP
Richard> trap process.

Richard> [...]
Richard> If I kill the process (^C) and restart it, straps
Richard> appears not to start (only one process showing) or if
Richard> it does (ps shows two pe`rocesses) it does not attach
Richard> to the port, messages rejected with a bad port
Richard> message. If I again ^C and restart the process, staps
Richard> will start OK.

Richard> This is consistent, restart failing the first time and
Richard> working OK the second.

Possibly this is based on the same problem Rajee Viswanathan
<RViswanathan@gensym.com> reported some time ago on the list.

The basic observation was:

Erik> However, I was able to reproduce this error, but i am not sure why it
Erik> happens. Anyway, if there is no straps server running, but a pipe
Erik> present in /tmp:
Erik>
Erik> > p--------- 1 root users 0 Oct 20 23:28 /tmp/.straps-162
Erik>
Erik> this error happens. It seems not to be related to sticky-bit
Erik> permission of /tmp; behavior is same with a t-bit set on /tmp
Erik> and without.
Erik>
Erik> The error does not occur, if this pseudo-file is removed
Erik> before launching a new `snmp# bind {} trap ...' (assuming the
Erik> straps server is already dead or killed).
Erik>
Erik> (However, if the t-bit is set on /tmp, a normal user is not
Erik> allowed to rm /tmp/.straps-162).

a untested, but possible fix could be:

--- straps.c-217 Wed Dec 10 11:24:51 1997
+++ straps.c Wed Dec 10 11:26:46 1997
@@ -217,6 +217,9 @@
exit(1);
}

+ /* set explicit mode of unix-socket: */
+ chmod (path, 0777);
+
#ifdef SIGPIPE
signal(SIGPIPE, ign_pipe);
#endif

Erik

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.