summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-04 07:06:16 +0200
committerGitHub <noreply@github.com>2021-09-04 07:06:16 +0200
commit0f6e1c99c7d5a38006542b074f0718f8f2e01cec (patch)
tree54f3ae8662567277af4b443176e89cd307a1ecad /src/conf_mode
parent5f1c1ae4770fe36b5290f34d2f3a248c6b1a0ddb (diff)
parent6b52387190f8213e7e02060e894c6ddd4fb7cb3d (diff)
downloadvyos-1x-0f6e1c99c7d5a38006542b074f0718f8f2e01cec.tar.gz
vyos-1x-0f6e1c99c7d5a38006542b074f0718f8f2e01cec.zip
Merge pull request #995 from plett/T971
login: T971 allow quoting in public-keys options
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system-login.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py
index 318ff276d..4dd7f936d 100755
--- a/src/conf_mode/system-login.py
+++ b/src/conf_mode/system-login.py
@@ -240,7 +240,9 @@ def apply(login):
# XXX: Should we deny using root at all?
home_dir = getpwnam(user).pw_dir
render(f'{home_dir}/.ssh/authorized_keys', 'login/authorized_keys.tmpl',
- user_config, permission=0o600, user=user, group='users')
+ user_config, permission=0o600,
+ formater=lambda _: _.replace("&quot;", '"'),
+ user=user, group='users')
except Exception as e:
raise ConfigError(f'Adding user "{user}" raised exception: "{e}"')