Dave Mason <[EMAIL PROTECTED]> wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Yuck. Can you please post straight text?
> It sounds like my new RLM module will have some pre-configured
> strings for the database access, something like "insertRadcheck
> %{sql: INSERT into radcheck (UserName, Attribute, op, Value) values
> (%s1, %s2, %s3, %s4)". Then it would take this and pass it to
> radius_xlat as the format string, along with the value strings?
See the function prototype. The REQUEST data structure is passed to
radius_xlat, and any "value" strings are just attributes. See
'doc/variables.txt'
> Then I save the output of radius_xlat in the REQUEST?
Only if you care what it is. You can simply throw it away, too.
> How does the RADIUS_ESCAPE_STRING function work?
You normally set it to NULL.
> 2. Where do I save my data in the REQUEST?
Config items, as new attributes.
> Unless there's a place for stuff like this, I can add another char*
> to the structure and keep it there.
I would really like to avoid that.
> 3. Once the rlm_sql post-auth function pulls the new stuff out of
> the REQUEST, it will need to do the insert or update. I took a
> look at sql_xlat and it appears to only support SELECTs. Also, the
> sql_* prototypes in rlm_sql.h dont have any insert or update
> methods. If I need to implement insert and update, is there
> something I can use as a guide?
Not really. I don't know much SQL.
> If I write such a routine and call it later, I guess the sqlsocket
> is maintained somewhere, but I need to build the SQL_INST?
No. That's already taken care of for you.
Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html