Lines Matching refs:spid

65 static bool check_mac_perms(pid_t spid, uid_t uid, const char *tctx, const char *perm, const char *…  in check_mac_perms()  argument
72 if (getpidcon(spid, &sctx) < 0) { in check_mac_perms()
73 ALOGE("SELinux: getpidcon(pid=%d) failed to retrieve pid context.\n", spid); in check_mac_perms()
77 ad.pid = spid; in check_mac_perms()
88 static bool check_mac_perms_from_getcon(pid_t spid, uid_t uid, const char *perm) in check_mac_perms_from_getcon() argument
94 return check_mac_perms(spid, uid, service_manager_context, perm, NULL); in check_mac_perms_from_getcon()
97 static bool check_mac_perms_from_lookup(pid_t spid, uid_t uid, const char *perm, const char *name) in check_mac_perms_from_lookup() argument
116 allowed = check_mac_perms(spid, uid, tctx, perm, name); in check_mac_perms_from_lookup()
121 static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid) in svc_can_register() argument
124 return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0; in svc_can_register()
127 static int svc_can_list(pid_t spid, uid_t uid) in svc_can_list() argument
130 return check_mac_perms_from_getcon(spid, uid, perm) ? 1 : 0; in svc_can_list()
133 static int svc_can_find(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid) in svc_can_find() argument
136 return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0; in svc_can_find()
181 uint32_t do_find_service(const uint16_t *s, size_t len, uid_t uid, pid_t spid) in do_find_service() argument
198 if (!svc_can_find(s, len, spid, uid)) { in do_find_service()
208 pid_t spid) in do_add_service() argument
218 if (!svc_can_register(s, len, spid, uid)) { in do_add_service()