projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc5a86f
)
handsfree-audio: Reject .Connect() from other senders
author
Vinicius Costa Gomes
<vinicius.gomes@openbossa.org>
Mon, 25 Mar 2013 22:05:20 +0000
(19:05 -0300)
committer
Denis Kenzior
<denkenz@gmail.com>
Wed, 27 Mar 2013 04:24:18 +0000
(23:24 -0500)
Only the agent should be able to call .Connect() on the card.
src/handsfree-audio.c
patch
|
blob
|
history
diff --git
a/src/handsfree-audio.c
b/src/handsfree-audio.c
index
4232074
..
f8df6d6
100644
(file)
--- a/
src/handsfree-audio.c
+++ b/
src/handsfree-audio.c
@@
-312,11
+312,17
@@
static DBusMessage *card_connect(DBusConnection *conn,
{
struct ofono_handsfree_card *card = data;
GIOChannel *io;
+ const char *sender;
int sk;
if (agent == NULL)
return __ofono_error_not_available(msg);
+ sender = dbus_message_get_sender(msg);
+
+ if (!g_str_equal(sender, agent->owner))
+ return __ofono_error_not_allowed(msg);
+
if (card->msg)
return __ofono_error_busy(msg);