Lines Matching refs:team

32 is_privileged(Team* team)  in is_privileged()  argument
35 return team->effective_uid == 0; in is_privileged()
42 Team* team = thread_get_current_thread()->team; in common_setregid() local
44 TeamLocker teamLocker(team); in common_setregid()
46 bool privileged = kernel || is_privileged(team); in common_setregid()
48 gid_t ssgid = team->saved_set_gid; in common_setregid()
52 rgid = team->real_gid; in common_setregid()
58 team->saved_set_gid = rgid; in common_setregid()
59 team->real_gid = rgid; in common_setregid()
60 team->effective_gid = rgid; in common_setregid()
66 rgid = team->real_gid; in common_setregid()
71 if (!privileged && rgid != team->real_gid in common_setregid()
72 && rgid != team->effective_gid) { in common_setregid()
78 if (rgid != team->real_gid) in common_setregid()
85 egid = team->effective_gid; in common_setregid()
87 if (!privileged && egid != team->effective_gid in common_setregid()
88 && egid != team->real_gid && egid != team->saved_set_gid) { in common_setregid()
94 team->real_gid = rgid; in common_setregid()
95 team->effective_gid = egid; in common_setregid()
96 team->saved_set_gid = ssgid; in common_setregid()
105 Team* team = thread_get_current_thread()->team; in common_setreuid() local
107 TeamLocker teamLocker(team); in common_setreuid()
109 bool privileged = kernel || is_privileged(team); in common_setreuid()
111 uid_t ssuid = team->saved_set_uid; in common_setreuid()
115 ruid = team->real_uid; in common_setreuid()
121 team->saved_set_uid = ruid; in common_setreuid()
122 team->real_uid = ruid; in common_setreuid()
123 team->effective_uid = ruid; in common_setreuid()
129 ruid = team->real_uid; in common_setreuid()
134 if (!privileged && ruid != team->real_uid in common_setreuid()
135 && ruid != team->effective_uid) { in common_setreuid()
141 if (ruid != team->real_uid) in common_setreuid()
148 euid = team->effective_uid; in common_setreuid()
150 if (!privileged && euid != team->effective_uid in common_setreuid()
151 && euid != team->real_uid && euid != team->saved_set_uid) { in common_setreuid()
157 team->real_uid = ruid; in common_setreuid()
158 team->effective_uid = euid; in common_setreuid()
159 team->saved_set_uid = ssuid; in common_setreuid()
168 Team* team = thread_get_current_thread()->team; in common_getgroups() local
170 TeamLocker teamLocker(team); in common_getgroups()
175 if (team->supplementary_groups != NULL) { in common_getgroups()
176 groups = team->supplementary_groups->groups; in common_getgroups()
177 actualCount = team->supplementary_groups->count; in common_getgroups()
182 groups = &team->effective_gid; in common_getgroups()
235 Team* team = thread_get_current_thread()->team; in common_setgroups() local
236 TeamLocker teamLocker(team); in common_setgroups()
238 BReference<BKernel::GroupsArray> previous = team->supplementary_groups; in common_setgroups()
240 team->supplementary_groups.SetTo(newGroups, true); in common_setgroups()
255 inherit_parent_user_and_group(Team* team, Team* parent) in inherit_parent_user_and_group() argument
257 team->saved_set_uid = parent->saved_set_uid; in inherit_parent_user_and_group()
258 team->real_uid = parent->real_uid; in inherit_parent_user_and_group()
259 team->effective_uid = parent->effective_uid; in inherit_parent_user_and_group()
260 team->saved_set_gid = parent->saved_set_gid; in inherit_parent_user_and_group()
261 team->real_gid = parent->real_gid; in inherit_parent_user_and_group()
262 team->effective_gid = parent->effective_gid; in inherit_parent_user_and_group()
263 team->supplementary_groups = parent->supplementary_groups; in inherit_parent_user_and_group()
268 update_set_id_user_and_group(Team* team, const char* file) in update_set_id_user_and_group() argument
275 TeamLocker teamLocker(team); in update_set_id_user_and_group()
278 team->saved_set_uid = st.st_uid; in update_set_id_user_and_group()
279 team->effective_uid = st.st_uid; in update_set_id_user_and_group()
283 team->saved_set_gid = st.st_gid; in update_set_id_user_and_group()
284 team->effective_gid = st.st_gid; in update_set_id_user_and_group()
294 Team* team = thread_get_current_thread()->team; in _kern_getgid() local
296 return effective ? team->effective_gid : team->real_gid; in _kern_getgid()
303 Team* team = thread_get_current_thread()->team; in _kern_getuid() local
305 return effective ? team->effective_uid : team->real_uid; in _kern_getuid()
343 Team* team = thread_get_current_thread()->team; in _user_getgid() local
345 return effective ? team->effective_gid : team->real_gid; in _user_getgid()
352 Team* team = thread_get_current_thread()->team; in _user_getuid() local
354 return effective ? team->effective_uid : team->real_uid; in _user_getuid()
383 Team* team = thread_get_current_thread()->team; in _user_setgroups() local
384 if (!is_privileged(team)) in _user_setgroups()