Config file include order bug?

Sven Hartge sven at svenhartge.de
Wed Jul 15 17:49:35 CEST 2020


On 15.07.20 17:14, Alan DeKok wrote:
> On Jul 15, 2020, at 8:19 AM, Sven Hartge <sven at svenhartge.de> wrote:

>> And in the end the load order should be fixed by sorting before loading to make it stable for everyone and not break semi-randomly based on the way a filesystem presents/stores the entries in a directory.

>   As alway, patches are welcome.

OK, please see the attached diff. Please note that I have no idea what I
am doing, this may be memleaky as hell (although I think I added the
free(namelist) to the correct places) and is not tested in any way.

I just adapted the example code from the scandir(3) man-page and
massaged it a bit to fit the existing code.

Also note: if one uses scandir one could technically use its own filter
to remove '.' and '..' from the list of entries but I wanted to change
to be as minimal as possible.

Grüße,
Sven.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20200715/ee516d54/attachment-0001.sig>


More information about the Freeradius-Users mailing list