On 12 Jul 2016, at 05:17, Krzysztof Grobelak <krzysztof.grobelak@enet.ie> wrote:
Hello All,
Is it possible to have similar functionality in a database stored reply item as with users file?
in users file:
user1 Cleartext-Password := “super_secret" Alc-Subsc-ID-Str := "%{Alc-Client-Hardware-Addr}", Alc-Subsc-Prof-Str := "sub_profile_1", Alc-SLA-Prof-Str := “sla_profile_1"
The above works and the %{Alc-Client-Hardware-Addr} gets expanded to a correct mac address.
However when the following is used in database:
+----+----------------+--------------------+----+-------------------------------+ | id | groupname | attribute | op | value | +----+----------------+--------------------+----+-------------------------------+ | 1 | profile_1 | Alc-Subsc-ID-Str | := | "%{Alc-Client-Hardware-Addr}" | | 2 | profile_1 | Alc-Subsc-Prof-Str | := | sub_profile_1 | | 3 | profile_1 | Alc-SLA-Prof-Str | := | sla_profile_1 | +----+----------------+--------------------+----+-------------------------------+
The value of Alc-Subsc-ID-Str attribute is returned as is, without expansion.
The comments in the sql module say that the sql should mirror the users file in functionality so i’m assuming i’m missing something ;)
Can you advice please?
In v3.1.x you can use %{xlat:<value>} But yeah, there should be a quoting column or something I guess. Fell free to submit patches against v4.0.x. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2