please document SQL-User-Name xlat option in sql-log module (1.1.7)
Nicolas Baradakis
nbk at sitadelle.com
Fri Nov 30 00:35:21 CET 2007
Stefan Winter wrote:
> rlm_sql_log has an option record
>
> {"sql_user_name", PW_TYPE_STRING_PTR,
> offsetof(rlm_sql_log_t,sql_user_name), NULL, ""},
>
> This is not documented in the config file. I tried to use %{SQL-User-Name}
> in my relay config, didn't know of this option's existence, so it was
> assumed to be NULL.
What is the problem then? If you don't set the option "sql_user_name"
rlm_sql_log doesn't create a "SQL-User-Name" pair. This is the same
as rlm_sql.
> The code then doesn't translate User-Name at all, and my variable subst
> created INSERT strings with an empty user name.
I'm not sure what you mean by that. rlm_sql_log expands %{User-Name} to
the username passed from the client, not an empty string.
> I suggest just copying the text from sql.conf, as the semantics seems to be
> the same:
>
> [...]
Indeed it is the same as rlm_sql, therefore I'm not sure there is really
a need to duplicate the whole description.
I think adding one line with an example will be enough, so you can notice
its existence.
sql_log {
path = ${radacctdir}/sql-relay
acct_table = "radacct"
postauth_table = "radpostauth"
sql_user_name = %{%{User-Name}:-DEFAULT}}
...
}
--
Nicolas Baradakis
More information about the Freeradius-Devel
mailing list