summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-security.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-20 17:06:14 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-20 17:06:14 +0000
commit7cdaf7f0a40fd815247f29cd6ff0c8365050ddfa (patch)
tree52e7b67a84b97aaf26728be3161637586ddf3b8a /hcid/dbus-security.c
parent489d06626b3c3497ae13281713b7ee4fb06524b8 (diff)
Fixed seg fault: reply Auth agent does not exist if there isn't a default one.
Diffstat (limited to 'hcid/dbus-security.c')
-rw-r--r--hcid/dbus-security.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 1477c2f4..f854d17c 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -781,6 +781,9 @@ static DBusHandlerResult authorize_service(DBusConnection *conn,
if (strcmp(dbus_message_get_sender(msg), sagent->id))
return error_rejected(conn, msg);
+ if (!default_auth_agent)
+ return error_auth_agent_does_not_exist(conn, msg);
+
return call_auth_agent(msg, default_auth_agent, adapter_path,
address, service_path, action);
}