Skip to content

authlogin: guard dbus_system_bus_client calls with optional_policy#1139

Open
thesamesam wants to merge 3 commits into
SELinuxProject:mainfrom
thesamesam:avoid-dbus
Open

authlogin: guard dbus_system_bus_client calls with optional_policy#1139
thesamesam wants to merge 3 commits into
SELinuxProject:mainfrom
thesamesam:avoid-dbus

Conversation

@thesamesam
Copy link
Copy Markdown
Contributor

The dbus policy may not be installed (yet) when installing the systemd
module (for the first time).

Note that it is possible I believe to use systemd w/o DBus at all but
it's quite rare.

Bug: https://bugs.gentoo.org/975996
Signed-off-by: Sam James sam@gentoo.org

@thesamesam thesamesam marked this pull request as draft May 25, 2026 08:52
@thesamesam
Copy link
Copy Markdown
Contributor Author

I don't yet understand why the sudo commit failed CI. The first commit is the only important one though. Feel free to cherry-pick that.

@thesamesam thesamesam marked this pull request as ready for review May 26, 2026 04:08
@pebenito
Copy link
Copy Markdown
Member

I don't yet understand why the sudo commit failed CI. The first commit is the only important one though. Feel free to cherry-pick that.

If init_systemd is disabled, the optional block is empty. I'd say move the rules out of the ifdef. If you have a systemd module, that's a good enough indicator to enable systemd rules.

@thesamesam
Copy link
Copy Markdown
Contributor Author

Thanks, duh..

…ith optional_policy

The dbus policy may not be installed (yet) when installing the systemd
module (for the first time).

Note that it is possible I believe to use systemd w/o DBus at all but
it's quite rare.

Bug: https://bugs.gentoo.org/975996
Signed-off-by: Sam James <sam@gentoo.org>
We need optional_policy here because the dbus policy may not (yet) be
available. Be consistent with other uses.

Just use optional_policy w/ no ifdef because when systemd is disabled,
we'd have an optional_policy that is empty otherwise.

Signed-off-by: Sam James <sam@gentoo.org>
Just noticed when checking calls for another problem in authlogin.

Signed-off-by: Sam James <sam@gentoo.org>
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