summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-15 16:51:17 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-15 16:52:52 +0200
commit79bb346293e95f6eaeacf114bf32009196035fe7 (patch)
treec1b2664903139016f3f7146b906388c6b7420076 /data
parentd119be2a5d9f58f1823f305db2e425850f1aee70 (diff)
downloadvyos-1x-79bb346293e95f6eaeacf114bf32009196035fe7.tar.gz
vyos-1x-79bb346293e95f6eaeacf114bf32009196035fe7.zip
login: radius: T2600: fix wrongly redered pam_radius_auth.conf
When multiple RADIUS servers have been configured, they have been all rendered onto a single line in the config. This lead to errors in syslog and not all servers beeing reachable.
Diffstat (limited to 'data')
-rw-r--r--data/templates/system-login/pam_radius_auth.conf.tmpl15
1 files changed, 7 insertions, 8 deletions
diff --git a/data/templates/system-login/pam_radius_auth.conf.tmpl b/data/templates/system-login/pam_radius_auth.conf.tmpl
index ad196fa3d..e38f45035 100644
--- a/data/templates/system-login/pam_radius_auth.conf.tmpl
+++ b/data/templates/system-login/pam_radius_auth.conf.tmpl
@@ -1,12 +1,11 @@
-# Automatically generated by VyOS
+# Automatically generated by system-login.py
# RADIUS configuration file
-{%- if radius_server %}
-# server[:port] shared_secret timeout (s) source_ip
-{% for s in radius_server %}
-{%- if not s.disabled -%}
-{{ s.address }}:{{ s.port }} {{ s.key }} {{ s.timeout }} {% if radius_source_address -%}{{ radius_source_address }}{% endif %}
-{% endif %}
-{%- endfor %}
+{% if radius_server %}
+# server[:port] shared_secret timeout source_ip
+{% for s in radius_server if not s.disabled %}
+{% set addr_port = s.address + ":" + s.port %}
+{{ "%-22s" | format(addr_port) }} {{ "%-25s" | format(s.key) }} {{ "%-10s" | format(s.timeout) }} {{ radius_source_address if radius_source_address }}
+{% endfor %}
priv-lvl 15
mapped_priv_user radius_priv_user