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