projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2af3f8
)
Protect Connect and Disconnect with security policy
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 6 Jan 2009 19:27:15 +0000
(20:27 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 6 Jan 2009 19:27:15 +0000
(20:27 +0100)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
99bb40b
..
4af71c3
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-185,6
+185,9
@@
static DBusMessage *do_connect(DBusConnection *conn,
DBG("conn %p", conn);
+ if (__connman_security_check_privileges(msg) < 0)
+ return __connman_error_permission_denied(msg);
+
if (network->connected == TRUE)
return __connman_error_failed(msg);
@@
-206,6
+209,9
@@
static DBusMessage *do_disconnect(DBusConnection *conn,
DBG("conn %p", conn);
+ if (__connman_security_check_privileges(msg) < 0)
+ return __connman_error_permission_denied(msg);
+
if (network->connected == FALSE)
return __connman_error_failed(msg);