Skip to content

Commit

Permalink
SBUS: warn loudly if bus denies access
Browse files Browse the repository at this point in the history
Reviewed-by: Alejandro López <[email protected]>
Reviewed-by: Justin Stephenson <[email protected]>
  • Loading branch information
alexey-tikhonov committed Aug 11, 2023
1 parent 2f08f87 commit 9380c8e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sbus/connection/sbus_dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ sbus_dbus_request_name(DBusConnection *dbus_conn, const char *name)

dbret = dbus_bus_request_name(dbus_conn, name, flags, &dbus_error);
if (dbret == -1) {
DEBUG(SSSDBG_CRIT_FAILURE, "Unable to request name on the "
"system bus [%s]: %s\n", dbus_error.name, dbus_error.message);
DEBUG(SSSDBG_CRIT_FAILURE, "Unable to request name '%s' on the system"
" bus [%s]: %s\n", name, dbus_error.name, dbus_error.message);
if (dbus_error_has_name(&dbus_error, DBUS_ERROR_ACCESS_DENIED)) {
DEBUG(SSSDBG_FATAL_FAILURE,
"Access denied - check dbus service configuration.\n");
sss_log(SSS_LOG_CRIT, "SSSD dbus service can't acquire bus name"
" - check dbus service configuration.");
}
ret = EIO;
goto done;
} else if (dbret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
Expand Down

0 comments on commit 9380c8e

Please sign in to comment.