Thank you Alan, Both are great solutions. I was looking through the FreeRadius xlat source for a concat function. Thank you for the rapid code update! I'll pull down the Ubuntu FreeRadius Source packages, apply the patch and re-build on my lab FreeRadius server. On Tue, Dec 7, 2021 at 7:34 AM Alan DeKok <aland@deployingradius.com> wrote:
On Dec 7, 2021, at 3:18 AM, Dean Arnold <dean@31st.me> wrote:
I am using FreeRadius with Google Secure LDAP & WPA2 Enterprise Auth and it's working great!
That's good to hear.
Is there a way to create a semi-colon (;) delimiter list from a multi valued attribute?
Um... no. :(
So I've added it to v3.0.x branch on GitHub:
https://github.com/FreeRADIUS/freeradius-server/commit/b8ad37d305b1c55ab22fd...
That patch *should* apply cleanly to 3.0.20 or later. But whatever you do, you'll have to re-build the server with the patch.
Thank you in advance.
This is my default site post-auth:
foreach &reply:ldapMemberOf { if ("%{Foreach-Variable-0}" =~ /cn=([^,=]+)/) { update reply { classMemberOf += "%{1}" } } } update reply { Class = "%{reply:classMemberOf[*]}"
You can also do:
foreach &reply:ldapMemberOf { if ("%{Foreach-Variable-0}" =~ /cn=([^,=]+)/) { update reply { classMemberOf := "%{classMemberOf};%{1}" } } }
Which should work. But it's a little fugly.
I've added:
%{concat:foo[*] ;}
So you could do:
foreach &reply:ldapMemberOf { if ("%{Foreach-Variable-0}" =~ /cn=([^,=]+)/) { update reply { classMemberOf += "%{1}" } } } update reply { Class += %{concat:reply:classMemberOf[*] ;}" }
And that would work.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html