freeradius-server icon indicating copy to clipboard operation
freeradius-server copied to clipboard

Add inotify support for dynamic home servers

Open alandekok opened this issue 3 years ago • 0 comments

Message

It may be useful to add inotify support for dynamic home servers. That way you can just add / delete files in raddb/home_servers, and the server will automatically load / delete the files.

Example code for inotify is at https://www.thegeekstuff.com/2010/04/inotify-c-program-example/

That doesn't seem too bad, actually. The realm.c file would have to be able to add an fd to the event list. But everything else would likely be less than 500 LoC. It would likely be best to have a linux-specific code path, and an OSX-specific code path.

Linux can use inotify, and OSX can use kqueue. The master code branch in has some code for kqueue(), see references to VNODE. Tho v3.2.x doesn't have support for anything other than read filters. It might be simples to just ignore OSX :)

alandekok avatar Aug 04 '22 16:08 alandekok