freeradius-server
freeradius-server copied to clipboard
Add inotify support for dynamic home servers
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 :)