>>>>> On Wed, 07 May 2008 16:45:25 -0700, Rob Garcelon said:

RG> I am running a (5.4.1) master snmpd, connected to an AgentX subagent
RG> that handles our MIBs.

RG> In order to log changes made with snmp SET commands, I require the name
RG> of the SNMPv3 user who issued the session -- the "securityName" given to
RG> the -u option to snmpset on the client side.

RG> Two part question: In what structure, or variable, within the master
RG> snmpd can I get the name of the user?

It's in the PDU handed to the agent, which is available within some of
the structures passed down the lower level MIBs.

RG> And has anyone extended the AgentX protocol in order to pass this
RG> name to the subagent handler?

No, that specifically out of scope within the IETF AgentX work by design.

RG> I've spent many hours in gdb (in both master and subagent), poking at
RG> various netsnmp_session kind of variables. The name does not appear to
RG> be saved in the session or request data structs.

It is in the session data.

However, it's really really really not recommended that you use it. It
was never meant to be something that should be depended upon by MIB
developers as information they'd have available to them (agentx is a
prime example of that; it's expected to be a completely trusted protocol
only communicating with a master that has already validated who's
looking for the information and out of scope of what the subagent should
have to worry it's pretty little head about).

Wes Hardaker
Sparta, Inc.

This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
Net-snmp-coders mailing list