Lines Matching refs:spid
59 static bool check_mac_perms(pid_t spid, const char *tctx, const char *perm, const char *name) in check_mac_perms() argument
65 if (getpidcon(spid, &sctx) < 0) { in check_mac_perms()
66 ALOGE("SELinux: getpidcon(pid=%d) failed to retrieve pid context.\n", spid); in check_mac_perms()
77 static bool check_mac_perms_from_getcon(pid_t spid, const char *perm) in check_mac_perms_from_getcon() argument
83 return check_mac_perms(spid, service_manager_context, perm, NULL); in check_mac_perms_from_getcon()
86 static bool check_mac_perms_from_lookup(pid_t spid, const char *perm, const char *name) in check_mac_perms_from_lookup() argument
105 allowed = check_mac_perms(spid, tctx, perm, name); in check_mac_perms_from_lookup()
110 static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid) in svc_can_register() argument
113 return check_mac_perms_from_lookup(spid, perm, str8(name, name_len)) ? 1 : 0; in svc_can_register()
116 static int svc_can_list(pid_t spid) in svc_can_list() argument
119 return check_mac_perms_from_getcon(spid, perm) ? 1 : 0; in svc_can_list()
122 static int svc_can_find(const uint16_t *name, size_t name_len, pid_t spid) in svc_can_find() argument
125 return check_mac_perms_from_lookup(spid, perm, str8(name, name_len)) ? 1 : 0; in svc_can_find()
170 …32_t do_find_service(struct binder_state *bs, const uint16_t *s, size_t len, uid_t uid, pid_t spid) in do_find_service() argument
174 if (!svc_can_find(s, len, spid)) { in do_find_service()
199 pid_t spid) in do_add_service() argument
209 if (!svc_can_register(s, len, spid)) { in do_add_service()