summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-02 16:08:57 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-02 17:13:25 +0200
commitaa7d7beea87c37ce5717ed89c0aba4388f0c3673 (patch)
tree0eac1832bdb68839ef3ba54e6b3835bf26ce9241 /src/conf_mode
parent9ce5a01ee0e6b7f98a354fd0bef6ca9807b028e9 (diff)
downloadvyos-1x-aa7d7beea87c37ce5717ed89c0aba4388f0c3673.tar.gz
vyos-1x-aa7d7beea87c37ce5717ed89c0aba4388f0c3673.zip
login: T3792: bugfix for usernames containing a hyphen
While migrating to get_config_dict() in commit e8a1c291b1 ("login: radius: T3192: migrate to get_config_dict()") the user-name was not excluded from mangling (no_tag_node_value_mangle=True). This resulted in a username "vyos-user" from CLI to be actually created as "vyos_user" on the system. This commit also adds respective Smoketests to prevent this in the future. (cherry picked from commit 658de9ea0fbe91e593f9cf0a8c434791282af100)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system-login.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py
index 59ea1d34b..78830931d 100755
--- a/src/conf_mode/system-login.py
+++ b/src/conf_mode/system-login.py
@@ -59,7 +59,7 @@ def get_config(config=None):
conf = Config()
base = ['system', 'login']
login = conf.get_config_dict(base, key_mangling=('-', '_'),
- get_first_key=True)
+ no_tag_node_value_mangle=True, get_first_key=True)
# users no longer existing in the running configuration need to be deleted
local_users = get_local_users()