Date: Sat, 4 Feb 2017 17:18:50 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313241 - stable/11/contrib/bsnmp/snmp_usm Message-ID: <201702041718.v14HIolP088535@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Feb 4 17:18:49 2017 New Revision: 313241 URL: https://svnweb.freebsd.org/changeset/base/313241 Log: MFC r311394: 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. CID: 1008573 Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:17:38 2017 (r313240) +++ stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:18:49 2017 (r313241) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) 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 && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702041718.v14HIolP088535>