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:22:54 +0100 |
commit | a70a4001fe0b3a91a7d86191ff32dcc7205d2eae (patch) | |
tree | 11267d936219dba6d6345ca7f37eb8eae59f7b95 | |
parent | 3f05c880ba4b0edfc4238ce15e6508473d30b379 (diff) | |
download | vyos-1x-a70a4001fe0b3a91a7d86191ff32dcc7205d2eae.tar.gz vyos-1x-a70a4001fe0b3a91a7d86191ff32dcc7205d2eae.zip |
snmp: T4093: add missing verify() step for required group per snmp v3 user
-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 e1852f2ce..8475e6808 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -489,6 +489,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(): |