Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload config on SELinux policy load #379

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matt-sheets
Copy link

@matt-sheets matt-sheets commented Oct 16, 2024

When a new SELinux policy is loaded, the dbus config file it carries may have been updated as well. As such, we should reload the dbus configuration to catch any changes. This logic already exists in the dbus-daemon code and this change is largely based off of that code.

When a new SELinux policy is loaded the dbus config file it carries may
have been updated as well.  As such, we should reload the dbus
configuration to catch any changes.  This logic already exists in the
dbus-daemon code and this change is largely based off of that code.
Copy link
Member

@dvdhrm dvdhrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Sadly, we cannot rely on the broker to have its controller as parent PID. So this either needs channeling via the controller interface, or we simply make the launcher listen for these events and trigger the reload from there (which I think is preferable).

*/
static int policy_reload_callback(int seqno) {
pid_t ppid = getppid();
return kill(ppid, SIGHUP);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The launcher/controller is not necessarily the parent PID. We need to pass this through the controller interface, just like the other activation related messages.

@matt-sheets
Copy link
Author

Thanks for the feedback, I am not very familiar with the broker code, so any input is more than welcome.

I have tried to move the callback registration into launcher itself, but the actual callback method never seems to run. I am still digging into this but not making great progress.

Could you possibly point me in the correct direction when you say "channeling via the controller interface" if setting up the callback in the launcher doesn't work out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants