diff options
author | Wink Saville <wink@google.com> | 2010-10-03 13:30:11 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2010-10-03 13:54:03 -0700 |
commit | cfa0d8439384a1aaa53d31fb720c234cabf796ee (patch) | |
tree | 6c9db78323f11a3b87c576fb040e26ac5952bc1b /init | |
parent | 4cfef735d54a752a183dcbe304ea2975c032666f (diff) | |
download | system_core-cfa0d8439384a1aaa53d31fb720c234cabf796ee.zip system_core-cfa0d8439384a1aaa53d31fb720c234cabf796ee.tar.gz system_core-cfa0d8439384a1aaa53d31fb720c234cabf796ee.tar.bz2 |
Allow AID_RADIO to restart the ril-daemon.
This enhances robustness by allowing the Telephony Framework to restart
ril-daemon if it notices some catastrophic failure.
Added setprop ctl.restart.
Added ril-daemon to setprop control_perms and allow users/groups
with the AID_RADIO ID to control it.
Change-Id: I195abdd754a731ce0b77e8f71ab47fde8c3e7977
Diffstat (limited to 'init')
-rwxr-xr-x | init/init.c | 3 | ||||
-rw-r--r-- | init/property_service.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c index 709cc40..cd129c3 100755 --- a/init/init.c +++ b/init/init.c @@ -384,6 +384,9 @@ void handle_control_message(const char *msg, const char *arg) msg_start(arg); } else if (!strcmp(msg,"stop")) { msg_stop(arg); + } else if (!strcmp(msg,"restart")) { + msg_stop(arg); + msg_start(arg); } else { ERROR("unknown control msg '%s'\n", msg); } diff --git a/init/property_service.c b/init/property_service.c index d8fea56..788252b 100644 --- a/init/property_service.c +++ b/init/property_service.c @@ -95,6 +95,7 @@ struct { unsigned int gid; } control_perms[] = { { "dumpstate",AID_SHELL, AID_LOG }, + { "ril-daemon",AID_RADIO, AID_RADIO }, {NULL, 0, 0 } }; @@ -397,8 +398,8 @@ void handle_property_set_fd() if (check_control_perms(msg.value, cr.uid, cr.gid)) { handle_control_message((char*) msg.name + 4, (char*) msg.value); } else { - ERROR("sys_prop: Unable to %s service ctl [%s] uid: %d pid:%d\n", - msg.name + 4, msg.value, cr.uid, cr.pid); + ERROR("sys_prop: Unable to %s service ctl [%s] uid:%d gid:%d pid:%d\n", + msg.name + 4, msg.value, cr.uid, cr.gid, cr.pid); } } else { if (check_perms(msg.name, cr.uid, cr.gid)) { |