please document SQL-User-Name xlat option in sql-log module (1.1.7)

Stefan Winter stefan.winter at restena.lu
Thu Nov 29 14:27:26 CET 2007


Hi,

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.

The code then doesn't translate User-Name at all, and my variable subst 
created INSERT strings with an empty user name. 

I suggest just copying the text from sql.conf, as the semantics seems to be 
the same:

      ####################################################################
      #  Query config:  Username
      ######################################################################
      # This is the username that will get substituted, escaped, and added
      # as attribute 'SQL-User-Name'.  '%{SQL-User-Name}' should be used below
      # everywhere a username substitution is needed so you you can be sure
      # the username passed from the client is escaped properly.
      #
      #  Uncomment the next line, if you want the sql_user_name to mean:
      #
      #    Use Stripped-User-Name, if it's there.
      #    Else use User-Name, if it's there,
      #    Else use hard-coded string "DEFAULT" as the user name.
      #sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}"
      #
      sql_user_name = "%{User-Name}"

Greetings,

Stefan

-- 
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de 
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at restena.lu     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20071129/20513f8f/attachment.pgp>


More information about the Freeradius-Devel mailing list