By the way, one thing that I've notice in the tests that I'm sure that has 
already been notice by someone. If the "if" clause of "cloneFrom" is in place 
and if we create a user in persistent snmpd.conf that has limited oid access 
(defined in the other snmpd.conf), there is no way of changing this user's 
password ever. It can't be change by other user because it hasn't been cloned 
and it cannot change its own password because of the oid's limitation (no 
Access error).


Thank you,
Sérgio Cabaço

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: quarta-feira, 25 de Fevereiro de 2009 15:28
To: Sergio Cabaço
Cc: Wes Hardaker; [email protected]
Subject: Re: Changing password first boot 5.3.2

2009/2/25 Sergio Cabaço <[email protected]>:
> The if condition that you pointed out in past mails, is the place where I'm 
> working.
> I was thinking in placing another condition in the if clause that tests if it 
> is the only
> existent user (complementing the cloneFrom test).

No - that feels the wrong thing to look for.
What if someone has inserted two or three "createUser" lines at the same time?

I've already indicated what I think is the right approach - to check whether
the SET request being processed is part of creating a new user or not.
   i.e. whether 'statP' has a non-null value.

That would imply something like the following (untested):

    if (statP == NULL && uptr->cloneFrom == NULL) {
        return SNMP_ERR_INCONSISTENTNAME;
    }


However, I do suggest you wait until Wes has had a chance to comment on
this discussion. He understands the SNMPv3 model somewhat better than I do.
(Remember, us Europeans are several hours in advance of the US West Coast!)

Dave

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to