Proposed patch for "embedded" freeradius-client library

Scott Neugroschl redfloyd at gmail.com
Fri May 21 20:12:22 CEST 2010


Alan DeKok wrote:
> 
> Scott Neugroschl wrote:
> > I have a patch to dict.c and freeradius-client.h to allow the
> dictionary
> > data to be loaded
> > from an in-memory table, instead of a disk file.
> >
> > If anyone is interested, I'll post the patch.
> 
>   Thanks.

The attached patch should do it.
Essentially, it factors out the parsing of ATTRIBUTE, VALUE,
and VENDOR strings into subroutines.  Then a function to
load a dictionary from a memory table (rc_load_dictionary).

To keep life simple, the memory table is a tag field with
four character string subfields.  Unused fields should be
set to the empty string ("").  The fields match the order
of the strings in the regular dictionary file.

POTENTIAL ISSUES WITH THIS PATCH:

There is a kludge that I haven't dealt with yet: the client
code must still set the dictionary file name in the config,
even if it's unused  (I used the string "(internal)").  This
is in case test_config() is called.   test_config makes sure
that there is a dictionary entry.  However, test_config() is
only called by rc_read_config(), which by definition we aren't
calling, so it's not that horrible.

Also, there's an omission in radembedded.c -- not included
in this patch.  radembedded needs to set the radius_deadtime
config variable, or else rc_sendmsg fails.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: embedded.patch
Type: application/octet-stream
Size: 13128 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20100521/4b906ca5/attachment.obj>


More information about the Freeradius-Devel mailing list