Lines Matching defs:egid
295 * Get effective group ID. The "egid" is groups[0], and could be obtained
323 * For FreeBSD < 15.0, we account for the egid being placed at the
876 * compatible. It says that setting the uid/gid to euid/egid is a special
1113 * Do we have "appropriate privileges" (are we root or gid == egid)
1144 * In all cases permitted cases, we are changing the egid.
1164 gid_t egid;
1173 gid_t egid;
1176 egid = uap->egid;
1177 AUDIT_ARG_EGID(egid);
1183 error = mac_cred_check_setegid(oldcred, egid);
1188 if (egid != oldcred->cr_rgid && /* allow setegid(getgid()) */
1189 egid != oldcred->cr_svgid && /* allow setegid(saved gid) */
1193 if (oldcred->cr_gid != egid) {
1194 change_egid(newcred, egid);
1218 * account for the egid appearing before the supplementary groups. This
1233 int ngroups = gidsetsize > 0 ? gidsetsize - 1 /* egid */ : 0;
1421 gid_t egid;
1430 gid_t egid, rgid;
1433 egid = uap->egid;
1435 AUDIT_ARG_EGID(egid);
1442 error = mac_cred_check_setregid(oldcred, rgid, egid);
1449 (egid != (gid_t)-1 && egid != oldcred->cr_gid &&
1450 egid != oldcred->cr_rgid && egid != oldcred->cr_svgid)) &&
1454 if (egid != (gid_t)-1 && oldcred->cr_gid != egid) {
1455 change_egid(newcred, egid);
1566 * setresgid(rgid, egid, sgid) is like setregid except control over the saved
1572 gid_t egid;
1582 gid_t egid, rgid, sgid;
1585 egid = uap->egid;
1588 AUDIT_ARG_EGID(egid);
1596 error = mac_cred_check_setresgid(oldcred, rgid, egid, sgid);
1604 (egid != (gid_t)-1 && egid != oldcred->cr_rgid &&
1605 egid != oldcred->cr_svgid &&
1606 egid != oldcred->cr_gid) ||
1613 if (egid != (gid_t)-1 && oldcred->cr_gid != egid) {
1614 change_egid(newcred, egid);
1666 gid_t *egid;
1681 if (uap->egid)
1683 uap->egid, sizeof(cred->cr_gid));
2269 * includes p's egid, group access list, rgid, and svgid.
2745 * this is kind of ugly; cr_ngroups still includes the egid for our
3136 change_egid(struct ucred *newcred, gid_t egid)
3139 newcred->cr_gid = egid;