Re: Unix socket not deleted in a config master/subagent

"Arnaud BODENAN" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
In the file, snmpd.c, I've seen the following code:

RETSIGTYPE
SnmpdShutDown(int a)
{
#ifdef WIN32
    extern netsnmp_session *main_session;
#endif
    running = 0;
#ifdef WIN32
    /*
     * In case of windows, select() in receive() function will not return
     * on signal. Thats why following function is called, which closes the
     * socket descriptors and causes the select() to return
     */
    snmp_close(main_session);
#endif
}

this function is registered for SIGINT and for SIGTERM. Is the socket freed 
in the function SnmpdShutDown (snmp_close)?

I put a printf in the function SnmpdShutDown, and launch the snmpd with the 
log activated.

I have the following messages :
Received TERM or STOP signal...  shutting down...

but I don't have my specific message although the SIGTERM has been detected.


>From: "Dave Shield" <[email protected]>
>To: "Arnaud BODENAN" <[email protected]>
>CC: [email protected]
>Subject: Re: Unix socket not deleted in a config master/subagent
>Date: Fri, 25 Aug 2006 15:58:43 +0100
>
>On 25/08/06, Arnaud BODENAN <[email protected]> wrote:
> > When I start the master agent, 'ls -ltr master' gives:
> > srwxrwxr-x   1 arnboden rms            0 Aug 25 11:09 ../master
> >
> > When I start the subagent, the same command gives the same result:
> > srwxrwxr-x   1 arnboden rms            0 Aug 25 11:09 ../master
>
>Yes.  That's as expected.
>The master agent creates the socket (and listens on it, and deletes it
>when it's finished).
>The subagent simply connects to it.
>
>The master agent *controls* the socket - the subagent *uses* it.
>
>
> > But, I'm a bit confused with this parameter (agentxsocket). When must I 
>use:
> > - a named socket?
> > - an address?
>
>There's no "must" - you can use either, depending on your particular
>requirements.
>OK - that's not quite true.   If your subagents are running on a
>different system than the master agent, then you need to use a TCP
>socket (i.e. an address).  If everything's running on the same box,
>then you can use either.
>
>
> > For security reasons, is it preferable to use named socket or address?
>
>A named socket.
>That allows you to use filesystem permissions to restrict access to it.
>A network socket is open to anybody - one of the biggest flaws in
>AgentX security.
>
>Dave
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job 
>easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Net-snmp-users mailing list
>[email protected]
>Please see the following page to unsubscribe or change other options:
>https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.