Pulling %{client:} into rlm_perl
Alan DeKok
aland at deployingradius.com
Fri Oct 21 20:13:27 CEST 2016
On Oct 21, 2016, at 1:52 PM, Boris Lytochkin <lytboris at yandex-team.ru> wrote:
> I'm implementing support for hash-like access (r/o I guess) to %{client:...} from rlm_perl module. The issue is that CONF_SECTION structure is just typedef'ed and there is no access to pair/section_tree from outside main/conffile.c.
Yes.
> Should I pull `struct conf_part` into headers or make some sort of walker inside conffile.c?
Please don't expose those data structures.
If you want to access them from Perl, it would be best to write a function in conffile.c that serializes the entries. And then parse that into rlm_perl hashes.
Exposing those data structures is very bad. It means that Perl is now magically tied to the conffile code, which makes it almost impossible to change the conffile code. As conffile.c is a critical piece of the server, keeping it secure and stable is a high priority.
> p/s. There's declaration of seems-to-be handy function:
> int dump_config(CONF_SECTION const *cs);
> but no code is there anymore :)
it was there for testing... deleted because it wasn't maintained.
Alan Dekok.
More information about the Freeradius-Devel
mailing list