session: unload rpcd configuration before checking login
authorJo-Philipp Wich <jo@mein.io>
Tue, 13 Jul 2021 18:31:16 +0000 (20:31 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 13 Jul 2021 18:41:02 +0000 (20:41 +0200)
commit1fa35765ddf64976aa48950cac53d501fb71dda0
tree734757388f531411d44d6d89b902dccc2bf04919
parent7a560a1a5769146ab072f8e0165940459d3e16f7
session: unload rpcd configuration before checking login

Currently, rpcd cached /etc/config/rpcd once on the first login and then
keeps checking login attempts and ACL settings against the in-memory
copy until the process is restarted.

This is not desirable as we would like added, modified or removed accounts
to be effective immediately. In order to achive this behaviour, ensure to
unload the currently loaded rpcd configuration before looking up the login
account section.

Ref: https://github.com/openwrt/luci/issues/5179
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
session.c