From e932d80b7b97ecb586c1d1be7750277c84ea65d1 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Wed, 17 Jun 2020 13:24:04 +0000 Subject: login: radius: T2299: Implement RADIUS servers priority --- data/templates/system-login/pam_radius_auth.conf.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates') diff --git a/data/templates/system-login/pam_radius_auth.conf.tmpl b/data/templates/system-login/pam_radius_auth.conf.tmpl index e38f45035..ec2d6df95 100644 --- a/data/templates/system-login/pam_radius_auth.conf.tmpl +++ b/data/templates/system-login/pam_radius_auth.conf.tmpl @@ -2,7 +2,7 @@ # RADIUS configuration file {% if radius_server %} # server[:port] shared_secret timeout source_ip -{% for s in radius_server if not s.disabled %} +{% for s in radius_server|sort(attribute='priority') 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 %} -- cgit v1.2.3