blob: 45bb1d05e8669201639efaf2fc5858e42950e2ba [file] [log] [blame]
Mike Lockwood94afecf2012-10-24 10:45:23 -07001/* Copyright 2008 The Android Open Source Project
2 */
3
Mike Lockwood94afecf2012-10-24 10:45:23 -07004#include <errno.h>
5#include <fcntl.h>
Elliott Hughes0b41ad52015-04-03 16:51:18 -07006#include <inttypes.h>
Mark Salyzyn13df5f52015-04-01 07:52:12 -07007#include <stdio.h>
8#include <stdlib.h>
9#include <string.h>
Mike Lockwood94afecf2012-10-24 10:45:23 -070010
Arve Hjønnevåg6b9c6d22016-08-18 15:42:35 -070011#include <cutils/multiuser.h>
12
Mike Lockwood94afecf2012-10-24 10:45:23 -070013#include <private/android_filesystem_config.h>
14
Riley Spahn69154df2014-06-05 11:07:18 -070015#include <selinux/android.h>
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070016#include <selinux/avc.h>
Riley Spahn69154df2014-06-05 11:07:18 -070017
Mike Lockwood94afecf2012-10-24 10:45:23 -070018#include "binder.h"
19
Martijn Coenen31361232017-03-31 16:12:12 -070020#ifdef VENDORSERVICEMANAGER
21#define LOG_TAG "VendorServiceManager"
Mike Lockwood94afecf2012-10-24 10:45:23 -070022#else
23#define LOG_TAG "ServiceManager"
Mike Lockwood94afecf2012-10-24 10:45:23 -070024#endif
Martijn Coenen31361232017-03-31 16:12:12 -070025#include <log/log.h>
Mike Lockwood94afecf2012-10-24 10:45:23 -070026
William Roberts8fb0f922015-10-01 22:02:15 -070027struct audit_data {
28 pid_t pid;
29 uid_t uid;
30 const char *name;
31};
32
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070033const char *str8(const uint16_t *x, size_t x_len)
Mike Lockwood94afecf2012-10-24 10:45:23 -070034{
35 static char buf[128];
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070036 size_t max = 127;
Mike Lockwood94afecf2012-10-24 10:45:23 -070037 char *p = buf;
38
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070039 if (x_len < max) {
40 max = x_len;
41 }
42
Mike Lockwood94afecf2012-10-24 10:45:23 -070043 if (x) {
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070044 while ((max > 0) && (*x != '\0')) {
Mike Lockwood94afecf2012-10-24 10:45:23 -070045 *p++ = *x++;
Nick Kralevich7d42a3c2014-07-12 16:34:01 -070046 max--;
Mike Lockwood94afecf2012-10-24 10:45:23 -070047 }
48 }
49 *p++ = 0;
50 return buf;
51}
52
Serban Constantinescu9b738bb2014-01-10 15:48:29 +000053int str16eq(const uint16_t *a, const char *b)
Mike Lockwood94afecf2012-10-24 10:45:23 -070054{
55 while (*a && *b)
56 if (*a++ != *b++) return 0;
57 if (*a || *b)
58 return 0;
59 return 1;
60}
61
Riley Spahnc67e6302014-07-08 09:03:00 -070062static char *service_manager_context;
Riley Spahn69154df2014-06-05 11:07:18 -070063static struct selabel_handle* sehandle;
64
William Roberts8fb0f922015-10-01 22:02:15 -070065static bool check_mac_perms(pid_t spid, uid_t uid, const char *tctx, const char *perm, const char *name)
Riley Spahn69154df2014-06-05 11:07:18 -070066{
Riley Spahn69154df2014-06-05 11:07:18 -070067 char *sctx = NULL;
Riley Spahnc67e6302014-07-08 09:03:00 -070068 const char *class = "service_manager";
69 bool allowed;
William Roberts8fb0f922015-10-01 22:02:15 -070070 struct audit_data ad;
Riley Spahn69154df2014-06-05 11:07:18 -070071
72 if (getpidcon(spid, &sctx) < 0) {
Riley Spahnc67e6302014-07-08 09:03:00 -070073 ALOGE("SELinux: getpidcon(pid=%d) failed to retrieve pid context.\n", spid);
Riley Spahn69154df2014-06-05 11:07:18 -070074 return false;
75 }
76
William Roberts8fb0f922015-10-01 22:02:15 -070077 ad.pid = spid;
78 ad.uid = uid;
79 ad.name = name;
80
81 int result = selinux_check_access(sctx, tctx, class, perm, (void *) &ad);
Riley Spahn69154df2014-06-05 11:07:18 -070082 allowed = (result == 0);
83
84 freecon(sctx);
Riley Spahnc67e6302014-07-08 09:03:00 -070085 return allowed;
86}
87
William Roberts8fb0f922015-10-01 22:02:15 -070088static bool check_mac_perms_from_getcon(pid_t spid, uid_t uid, const char *perm)
Riley Spahnc67e6302014-07-08 09:03:00 -070089{
William Roberts8fb0f922015-10-01 22:02:15 -070090 return check_mac_perms(spid, uid, service_manager_context, perm, NULL);
Riley Spahnc67e6302014-07-08 09:03:00 -070091}
92
William Roberts8fb0f922015-10-01 22:02:15 -070093static bool check_mac_perms_from_lookup(pid_t spid, uid_t uid, const char *perm, const char *name)
Riley Spahnc67e6302014-07-08 09:03:00 -070094{
95 bool allowed;
96 char *tctx = NULL;
97
Riley Spahnc67e6302014-07-08 09:03:00 -070098 if (!sehandle) {
99 ALOGE("SELinux: Failed to find sehandle. Aborting service_manager.\n");
100 abort();
101 }
102
103 if (selabel_lookup(sehandle, &tctx, name, 0) != 0) {
104 ALOGE("SELinux: No match for %s in service_contexts.\n", name);
105 return false;
106 }
107
William Roberts8fb0f922015-10-01 22:02:15 -0700108 allowed = check_mac_perms(spid, uid, tctx, perm, name);
Riley Spahn69154df2014-06-05 11:07:18 -0700109 freecon(tctx);
110 return allowed;
111}
112
William Roberts8fb0f922015-10-01 22:02:15 -0700113static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700114{
Riley Spahnc67e6302014-07-08 09:03:00 -0700115 const char *perm = "add";
Arve Hjønnevåg5fa90a02016-08-01 16:05:17 -0700116
Arve Hjønnevåg6b9c6d22016-08-18 15:42:35 -0700117 if (multiuser_get_app_id(uid) >= AID_APP) {
Arve Hjønnevåg5fa90a02016-08-01 16:05:17 -0700118 return 0; /* Don't allow apps to register services */
119 }
120
William Roberts8fb0f922015-10-01 22:02:15 -0700121 return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0;
Riley Spahnc67e6302014-07-08 09:03:00 -0700122}
123
William Roberts8fb0f922015-10-01 22:02:15 -0700124static int svc_can_list(pid_t spid, uid_t uid)
Riley Spahnc67e6302014-07-08 09:03:00 -0700125{
126 const char *perm = "list";
William Roberts8fb0f922015-10-01 22:02:15 -0700127 return check_mac_perms_from_getcon(spid, uid, perm) ? 1 : 0;
Riley Spahnc67e6302014-07-08 09:03:00 -0700128}
129
William Roberts8fb0f922015-10-01 22:02:15 -0700130static int svc_can_find(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid)
Riley Spahnc67e6302014-07-08 09:03:00 -0700131{
132 const char *perm = "find";
William Roberts8fb0f922015-10-01 22:02:15 -0700133 return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700134}
135
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000136struct svcinfo
Mike Lockwood94afecf2012-10-24 10:45:23 -0700137{
138 struct svcinfo *next;
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000139 uint32_t handle;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700140 struct binder_death death;
141 int allow_isolated;
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000142 size_t len;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700143 uint16_t name[0];
144};
145
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000146struct svcinfo *svclist = NULL;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700147
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000148struct svcinfo *find_svc(const uint16_t *s16, size_t len)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700149{
150 struct svcinfo *si;
151
152 for (si = svclist; si; si = si->next) {
153 if ((len == si->len) &&
154 !memcmp(s16, si->name, len * sizeof(uint16_t))) {
155 return si;
156 }
157 }
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000158 return NULL;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700159}
160
161void svcinfo_death(struct binder_state *bs, void *ptr)
162{
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000163 struct svcinfo *si = (struct svcinfo* ) ptr;
164
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700165 ALOGI("service '%s' died\n", str8(si->name, si->len));
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000166 if (si->handle) {
167 binder_release(bs, si->handle);
168 si->handle = 0;
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000169 }
Mike Lockwood94afecf2012-10-24 10:45:23 -0700170}
171
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000172uint16_t svcmgr_id[] = {
Mike Lockwood94afecf2012-10-24 10:45:23 -0700173 'a','n','d','r','o','i','d','.','o','s','.',
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000174 'I','S','e','r','v','i','c','e','M','a','n','a','g','e','r'
Mike Lockwood94afecf2012-10-24 10:45:23 -0700175};
Mike Lockwood94afecf2012-10-24 10:45:23 -0700176
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000177
Ian Pedowitzd57d9b92016-02-19 08:34:43 +0000178uint32_t do_find_service(const uint16_t *s, size_t len, uid_t uid, pid_t spid)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700179{
Nick Kralevichb27bbd12015-03-05 10:58:40 -0800180 struct svcinfo *si = find_svc(s, len);
181
182 if (!si || !si->handle) {
183 return 0;
184 }
185
186 if (!si->allow_isolated) {
187 // If this service doesn't allow access from isolated processes,
188 // then check the uid to see if it is isolated.
189 uid_t appid = uid % AID_USER;
190 if (appid >= AID_ISOLATED_START && appid <= AID_ISOLATED_END) {
191 return 0;
192 }
193 }
Mike Lockwood94afecf2012-10-24 10:45:23 -0700194
William Roberts8fb0f922015-10-01 22:02:15 -0700195 if (!svc_can_find(s, len, spid, uid)) {
Riley Spahnc67e6302014-07-08 09:03:00 -0700196 return 0;
197 }
Nick Kralevichb27bbd12015-03-05 10:58:40 -0800198
199 return si->handle;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700200}
201
202int do_add_service(struct binder_state *bs,
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000203 const uint16_t *s, size_t len,
Riley Spahn69154df2014-06-05 11:07:18 -0700204 uint32_t handle, uid_t uid, int allow_isolated,
205 pid_t spid)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700206{
207 struct svcinfo *si;
Serban Constantinescu3a345f02013-12-19 09:11:41 +0000208
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700209 //ALOGI("add_service('%s',%x,%s) uid=%d\n", str8(s, len), handle,
Mike Lockwood94afecf2012-10-24 10:45:23 -0700210 // allow_isolated ? "allow_isolated" : "!allow_isolated", uid);
211
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000212 if (!handle || (len == 0) || (len > 127))
Mike Lockwood94afecf2012-10-24 10:45:23 -0700213 return -1;
214
William Roberts8fb0f922015-10-01 22:02:15 -0700215 if (!svc_can_register(s, len, spid, uid)) {
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000216 ALOGE("add_service('%s',%x) uid=%d - PERMISSION DENIED\n",
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700217 str8(s, len), handle, uid);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700218 return -1;
219 }
220
221 si = find_svc(s, len);
222 if (si) {
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000223 if (si->handle) {
224 ALOGE("add_service('%s',%x) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700225 str8(s, len), handle, uid);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700226 svcinfo_death(bs, si);
227 }
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000228 si->handle = handle;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700229 } else {
230 si = malloc(sizeof(*si) + (len + 1) * sizeof(uint16_t));
231 if (!si) {
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000232 ALOGE("add_service('%s',%x) uid=%d - OUT OF MEMORY\n",
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700233 str8(s, len), handle, uid);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700234 return -1;
235 }
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000236 si->handle = handle;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700237 si->len = len;
238 memcpy(si->name, s, (len + 1) * sizeof(uint16_t));
239 si->name[len] = '\0';
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000240 si->death.func = (void*) svcinfo_death;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700241 si->death.ptr = si;
242 si->allow_isolated = allow_isolated;
243 si->next = svclist;
244 svclist = si;
245 }
246
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000247 binder_acquire(bs, handle);
248 binder_link_to_death(bs, handle, &si->death);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700249 return 0;
250}
251
252int svcmgr_handler(struct binder_state *bs,
Serban Constantinescubcf38882014-01-10 13:56:27 +0000253 struct binder_transaction_data *txn,
Mike Lockwood94afecf2012-10-24 10:45:23 -0700254 struct binder_io *msg,
255 struct binder_io *reply)
256{
257 struct svcinfo *si;
258 uint16_t *s;
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000259 size_t len;
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000260 uint32_t handle;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700261 uint32_t strict_policy;
262 int allow_isolated;
263
Elliott Hughes0b41ad52015-04-03 16:51:18 -0700264 //ALOGI("target=%p code=%d pid=%d uid=%d\n",
265 // (void*) txn->target.ptr, txn->code, txn->sender_pid, txn->sender_euid);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700266
Elliott Hughes0b41ad52015-04-03 16:51:18 -0700267 if (txn->target.ptr != BINDER_SERVICE_MANAGER)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700268 return -1;
269
Arve Hjønnevåge5245cb2014-01-28 21:35:03 -0800270 if (txn->code == PING_TRANSACTION)
271 return 0;
272
Mike Lockwood94afecf2012-10-24 10:45:23 -0700273 // Equivalent to Parcel::enforceInterface(), reading the RPC
274 // header with the strict mode policy mask and the interface name.
275 // Note that we ignore the strict_policy and don't propagate it
276 // further (since we do no outbound RPCs anyway).
277 strict_policy = bio_get_uint32(msg);
278 s = bio_get_string16(msg, &len);
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700279 if (s == NULL) {
280 return -1;
281 }
282
Mike Lockwood94afecf2012-10-24 10:45:23 -0700283 if ((len != (sizeof(svcmgr_id) / 2)) ||
284 memcmp(svcmgr_id, s, sizeof(svcmgr_id))) {
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700285 fprintf(stderr,"invalid id %s\n", str8(s, len));
Mike Lockwood94afecf2012-10-24 10:45:23 -0700286 return -1;
287 }
288
Riley Spahn69154df2014-06-05 11:07:18 -0700289 if (sehandle && selinux_status_updated() > 0) {
290 struct selabel_handle *tmp_sehandle = selinux_android_service_context_handle();
291 if (tmp_sehandle) {
292 selabel_close(sehandle);
293 sehandle = tmp_sehandle;
294 }
295 }
296
Mike Lockwood94afecf2012-10-24 10:45:23 -0700297 switch(txn->code) {
298 case SVC_MGR_GET_SERVICE:
299 case SVC_MGR_CHECK_SERVICE:
300 s = bio_get_string16(msg, &len);
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700301 if (s == NULL) {
302 return -1;
303 }
Ian Pedowitzd57d9b92016-02-19 08:34:43 +0000304 handle = do_find_service(s, len, txn->sender_euid, txn->sender_pid);
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000305 if (!handle)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700306 break;
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000307 bio_put_ref(reply, handle);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700308 return 0;
309
310 case SVC_MGR_ADD_SERVICE:
311 s = bio_get_string16(msg, &len);
Nick Kralevich7d42a3c2014-07-12 16:34:01 -0700312 if (s == NULL) {
313 return -1;
314 }
Serban Constantinescu5fb1b882014-01-30 14:07:34 +0000315 handle = bio_get_ref(msg);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700316 allow_isolated = bio_get_uint32(msg) ? 1 : 0;
Riley Spahn69154df2014-06-05 11:07:18 -0700317 if (do_add_service(bs, s, len, handle, txn->sender_euid,
318 allow_isolated, txn->sender_pid))
Mike Lockwood94afecf2012-10-24 10:45:23 -0700319 return -1;
320 break;
321
322 case SVC_MGR_LIST_SERVICES: {
Serban Constantinescu3a345f02013-12-19 09:11:41 +0000323 uint32_t n = bio_get_uint32(msg);
Mike Lockwood94afecf2012-10-24 10:45:23 -0700324
William Roberts8fb0f922015-10-01 22:02:15 -0700325 if (!svc_can_list(txn->sender_pid, txn->sender_euid)) {
Riley Spahnc67e6302014-07-08 09:03:00 -0700326 ALOGE("list_service() uid=%d - PERMISSION DENIED\n",
327 txn->sender_euid);
328 return -1;
329 }
Mike Lockwood94afecf2012-10-24 10:45:23 -0700330 si = svclist;
331 while ((n-- > 0) && si)
332 si = si->next;
333 if (si) {
334 bio_put_string16(reply, si->name);
335 return 0;
336 }
337 return -1;
338 }
339 default:
340 ALOGE("unknown code %d\n", txn->code);
341 return -1;
342 }
343
344 bio_put_uint32(reply, 0);
345 return 0;
346}
347
Riley Spahn69154df2014-06-05 11:07:18 -0700348
Ian Pedowitzd57d9b92016-02-19 08:34:43 +0000349static int audit_callback(void *data, __unused security_class_t cls, char *buf, size_t len)
Riley Spahn69154df2014-06-05 11:07:18 -0700350{
William Roberts8fb0f922015-10-01 22:02:15 -0700351 struct audit_data *ad = (struct audit_data *)data;
352
353 if (!ad || !ad->name) {
354 ALOGE("No service manager audit data");
355 return 0;
356 }
357
358 snprintf(buf, len, "service=%s pid=%d uid=%d", ad->name, ad->pid, ad->uid);
Riley Spahn69154df2014-06-05 11:07:18 -0700359 return 0;
360}
361
Martijn Coenen69b05152017-03-21 10:00:38 -0700362int main(int argc, char** argv)
Mike Lockwood94afecf2012-10-24 10:45:23 -0700363{
364 struct binder_state *bs;
Sandeep Patil93ba7012016-12-27 12:40:45 -0800365 union selinux_callback cb;
Martijn Coenen69b05152017-03-21 10:00:38 -0700366 char *driver;
Mike Lockwood94afecf2012-10-24 10:45:23 -0700367
Martijn Coenen69b05152017-03-21 10:00:38 -0700368 if (argc > 1) {
369 driver = argv[1];
370 } else {
371 driver = "/dev/binder";
372 }
373
374 bs = binder_open(driver, 128*1024);
Serban Constantinescua44542c2014-01-30 15:16:45 +0000375 if (!bs) {
Martijn Coenen31361232017-03-31 16:12:12 -0700376#ifdef VENDORSERVICEMANAGER
377 ALOGW("failed to open binder driver %s\n", driver);
378 while (true) {
379 sleep(UINT_MAX);
380 }
381#else
Martijn Coenen69b05152017-03-21 10:00:38 -0700382 ALOGE("failed to open binder driver %s\n", driver);
Martijn Coenen31361232017-03-31 16:12:12 -0700383#endif
Serban Constantinescua44542c2014-01-30 15:16:45 +0000384 return -1;
385 }
Mike Lockwood94afecf2012-10-24 10:45:23 -0700386
387 if (binder_become_context_manager(bs)) {
388 ALOGE("cannot become context manager (%s)\n", strerror(errno));
389 return -1;
390 }
391
Sandeep Patil93ba7012016-12-27 12:40:45 -0800392 cb.func_audit = audit_callback;
393 selinux_set_callback(SELINUX_CB_AUDIT, cb);
394 cb.func_log = selinux_log_callback;
395 selinux_set_callback(SELINUX_CB_LOG, cb);
396
Martijn Coenen31361232017-03-31 16:12:12 -0700397#ifdef VENDORSERVICEMANAGER
398 sehandle = selinux_android_vendor_service_context_handle();
399#else
Riley Spahn69154df2014-06-05 11:07:18 -0700400 sehandle = selinux_android_service_context_handle();
Martijn Coenen31361232017-03-31 16:12:12 -0700401#endif
Stephen Smalleybea07462015-06-03 09:25:37 -0400402 selinux_status_open(true);
Riley Spahn69154df2014-06-05 11:07:18 -0700403
Nick Kralevicheb4d5cb2016-12-09 17:05:09 -0800404 if (sehandle == NULL) {
405 ALOGE("SELinux: Failed to acquire sehandle. Aborting.\n");
406 abort();
407 }
Riley Spahnc67e6302014-07-08 09:03:00 -0700408
Nick Kralevicheb4d5cb2016-12-09 17:05:09 -0800409 if (getcon(&service_manager_context) != 0) {
410 ALOGE("SELinux: Failed to acquire service_manager context. Aborting.\n");
411 abort();
Riley Spahnc67e6302014-07-08 09:03:00 -0700412 }
413
Riley Spahn69154df2014-06-05 11:07:18 -0700414
Mike Lockwood94afecf2012-10-24 10:45:23 -0700415 binder_loop(bs, svcmgr_handler);
Serban Constantinescu9b738bb2014-01-10 15:48:29 +0000416
Mike Lockwood94afecf2012-10-24 10:45:23 -0700417 return 0;
418}