Hi. 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. Should I pull `struct conf_part` into headers or make some sort of walker inside conffile.c? p/s. There's declaration of seems-to-be handy function: int dump_config(CONF_SECTION const *cs); but no code is there anymore :) -- Boris Lytochkin Yandex NOC +7 (495) 739 70 00 ext. 7671
On Oct 21, 2016, at 1:52 PM, Boris Lytochkin <lytboris@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.
Hi. Forget about previous message. I made xlat string processing from perl script (radiusd::radius_xlat function). Will send pull request after some testing. On 21.10.2016 20:52, Boris Lytochkin wrote:
Hi.
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.
Should I pull `struct conf_part` into headers or make some sort of walker inside conffile.c?
p/s. There's declaration of seems-to-be handy function: int dump_config(CONF_SECTION const *cs); but no code is there anymore :)
-- Boris Lytochkin Yandex NOC +7 (495) 739 70 00 ext. 7671
participants (2)
-
Alan DeKok -
Boris Lytochkin