summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/data_provider_be.c20
-rw-r--r--src/sbus/sssd_dbus_connection.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 2bc1930c..473d83ac 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -349,6 +349,11 @@ static void acctinfo_callback(struct be_req *req,
}
dbus_conn = sbus_get_connection(req->becli->conn);
+ if (!dbus_conn) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ return;
+ }
+
dbus_connection_send(dbus_conn, reply, NULL);
dbus_message_unref(reply);
@@ -592,6 +597,11 @@ static void be_pam_handler_callback(struct be_req *req,
}
dbus_conn = sbus_get_connection(req->becli->conn);
+ if (!dbus_conn) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ return;
+ }
+
dbus_connection_send(dbus_conn, reply, NULL);
dbus_message_unref(reply);
@@ -751,6 +761,11 @@ static void be_sudo_handler_reply(struct sbus_connection *conn,
dp_err, dp_ret, errstr ? errstr : "<NULL>"));
dbus_conn = sbus_get_connection(conn);
+ if (!dbus_conn) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ return;
+ }
+
dbus_connection_send(dbus_conn, reply, NULL);
dbus_message_unref(reply);
}
@@ -1139,6 +1154,11 @@ static void be_autofs_handler_callback(struct be_req *req,
}
dbus_conn = sbus_get_connection(req->becli->conn);
+ if (!dbus_conn) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ return;
+ }
+
dbus_connection_send(dbus_conn, reply, NULL);
dbus_message_unref(reply);
diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c
index 9faf3d9f..9077b81c 100644
--- a/src/sbus/sssd_dbus_connection.c
+++ b/src/sbus/sssd_dbus_connection.c
@@ -707,6 +707,10 @@ int sbus_conn_send(struct sbus_connection *conn,
dbus_bool_t dbret;
dbus_conn = sbus_get_connection(conn);
+ if (!dbus_conn) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ return ENOTCONN;
+ }
dbret = dbus_connection_send_with_reply(dbus_conn, msg,
&pending_reply,