diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-27 19:22:46 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-27 19:23:03 +0100 |
commit | 7f01cf0eb11c5a884eb65e2b5766051cd57fb8d7 (patch) | |
tree | b20206d4c79934298eefacfbef9867e6db44ffa6 | |
parent | acf90165456e87cff19f45053261667803255c8e (diff) | |
download | vyos-1x-7f01cf0eb11c5a884eb65e2b5766051cd57fb8d7.tar.gz vyos-1x-7f01cf0eb11c5a884eb65e2b5766051cd57fb8d7.zip |
snmp: T4093: add missing verify() step for required group per snmp v3 user
(cherry picked from commit a70a4001fe0b3a91a7d86191ff32dcc7205d2eae)
-rwxr-xr-x | src/conf_mode/snmp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index 0fbe90cce..6d22d06f1 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -480,6 +480,10 @@ def verify(snmp): # Group must exist prior to mapping it into a group # seclevel will be extracted from group # + if 'group' not in user or user['group'] == '': + username = user['name'] + raise ConfigError(f'Group membership required for user "{username}"!') + if user['group']: error = True if 'v3_groups' in snmp.keys(): |