summaryrefslogtreecommitdiff
path: root/src/sbus
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-03-30 21:15:30 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-04-05 15:21:34 -0700
commit6e8b4d412a9a28bb79f575b9970c3fd7876609ac (patch)
tree0aa8d4c81777b13771459124fe5116bac00dd486 /src/sbus
parent7dee0a3366c21ad06720176ca8aef8d6a6f0da90 (diff)
downloadsssd-6e8b4d412a9a28bb79f575b9970c3fd7876609ac.tar.gz
sssd-6e8b4d412a9a28bb79f575b9970c3fd7876609ac.tar.bz2
sssd-6e8b4d412a9a28bb79f575b9970c3fd7876609ac.zip
Catch cases where D-Bus connection is NULL
https://fedorahosted.org/sssd/ticket/1270
Diffstat (limited to 'src/sbus')
-rw-r--r--src/sbus/sssd_dbus_connection.c4
1 files changed, 4 insertions, 0 deletions
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,