Proposed patch for "embedded" freeradius-client library
I'm working in a rather oddball environment, and have come up with a patch to allow freeradius-client 1.1.6 usage in an "embedded" environment -- without any config files at all. I started from the example radembedded.c and noted that it still needed a dictionary file. 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. Scott Neugroschl
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.
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.
Hi Alan, Noticed that this isn't in the CVS head. Since my personal working baseline includes this, I was wondering if it was going to be submitted soon, since I have the Access-Challenge patch ready too. Thanks, Scott Neugroschl (ScottN)
participants (2)
-
Alan DeKok -
Scott Neugroschl