summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-07-07 16:27:42 -0700
committerNick Kralevich <nnk@google.com>2014-07-07 16:27:42 -0700
commit0830ce19ae120801814e49659bd775b838fb73e8 (patch)
tree9796f01f17bfafa2cedf9cf23f9f6bf2eb68b27c /cmds
parentf0ca9cd773a14690ff114fc43217475d3f0f6ec2 (diff)
parent1aa9565ce1c6c12c3c5b38f8fdaddd489d18fea6 (diff)
downloadframeworks_native-0830ce19ae120801814e49659bd775b838fb73e8.zip
frameworks_native-0830ce19ae120801814e49659bd775b838fb73e8.tar.gz
frameworks_native-0830ce19ae120801814e49659bd775b838fb73e8.tar.bz2
resolved conflicts for merge of 1aa9565c to master
Change-Id: I30582926ab2d2e2b97cb95aaedcd54ba51832aba
Diffstat (limited to 'cmds')
-rw-r--r--cmds/servicemanager/service_manager.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 0d0ef00..f142093 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -20,44 +20,6 @@
#include <cutils/log.h>
#endif
-/* TODO:
- * These should come from a config file or perhaps be
- * based on some namespace rules of some sort (media
- * uid can register media.*, etc)
- */
-static struct {
- uid_t uid;
- const char *name;
-} allowed[] = {
- { AID_MEDIA, "media.audio_flinger" },
- { AID_MEDIA, "media.log" },
- { AID_MEDIA, "media.player" },
- { AID_MEDIA, "media.camera" },
- { AID_MEDIA, "media.audio_policy" },
- { AID_MEDIA, "media.sound_trigger_hw" },
- { AID_AUDIO, "audio" },
- { AID_INPUT, "input" },
- { AID_DRM, "drm.drmManager" },
- { AID_NFC, "nfc" },
- { AID_BLUETOOTH, "bluetooth" },
- { AID_RADIO, "radio.phone" },
- { AID_RADIO, "radio.sms" },
- { AID_RADIO, "radio.phonesubinfo" },
- { AID_RADIO, "radio.simphonebook" },
-/* TODO: remove after phone services are updated: */
- { AID_RADIO, "phone" },
- { AID_RADIO, "sip" },
- { AID_RADIO, "isms" },
- { AID_RADIO, "iphonesubinfo" },
- { AID_RADIO, "simphonebook" },
- { AID_MEDIA, "common_time.clock" },
- { AID_MEDIA, "common_time.config" },
- { AID_KEYSTORE, "android.security.keystore" },
- { AID_RADIO, "telecomm" },
- { AID_RADIO, "isub" },
- { AID_RADIO, "ims" },
-};
-
uint32_t svcmgr_handle;
const char *str8(const uint16_t *x)
@@ -137,16 +99,7 @@ static bool check_mac_perms(const char *name, pid_t spid)
static int svc_can_register(uid_t uid, const uint16_t *name, pid_t spid)
{
- size_t n;
-
- if ((uid == 0) || (uid == AID_SYSTEM))
- return check_mac_perms(str8(name), spid) ? 1 : 0;
-
- for (n = 0; n < sizeof(allowed) / sizeof(allowed[0]); n++)
- if ((uid == allowed[n].uid) && str16eq(name, allowed[n].name))
- return check_mac_perms(str8(name), spid) ? 1 : 0;
-
- return 0;
+ return check_mac_perms(str8(name), spid) ? 1 : 0;
}
struct svcinfo