op_usm_users: don't deref uusers if it's NULL when SETting the value
Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. MFC after: 2 weeks Reported by: Coverity CID: 1008573
This commit is contained in:
parent
18d124d977
commit
60c2226f89
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311394
@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, struct snmp_value *val,
|
|||||||
val->var.subs[sub - 1] != LEAF_usmUserCloneFrom)
|
val->var.subs[sub - 1] != LEAF_usmUserCloneFrom)
|
||||||
return (SNMP_ERR_NOSUCHNAME);
|
return (SNMP_ERR_NOSUCHNAME);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XXX (ngie): need to investigate the MIB to determine how
|
||||||
|
* this is possible given some of the transitions below.
|
||||||
|
*/
|
||||||
if (community != COMM_INITIALIZE &&
|
if (community != COMM_INITIALIZE &&
|
||||||
uuser->type == StorageType_readOnly)
|
uuser != NULL && uuser->type == StorageType_readOnly)
|
||||||
return (SNMP_ERR_NOT_WRITEABLE);
|
return (SNMP_ERR_NOT_WRITEABLE);
|
||||||
|
|
||||||
switch (val->var.subs[sub - 1]) {
|
switch (val->var.subs[sub - 1]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user