Lines Matching refs:egid
361 long __sys_setregid(gid_t rgid, gid_t egid) in __sys_setregid() argument
370 kegid = make_kgid(ns, egid); in __sys_setregid()
374 if ((egid != (gid_t) -1) && !gid_valid(kegid)) in __sys_setregid()
385 gid_eq(old->egid, krgid) || in __sys_setregid()
391 if (egid != (gid_t) -1) { in __sys_setregid()
393 gid_eq(old->egid, kegid) || in __sys_setregid()
396 new->egid = kegid; in __sys_setregid()
402 (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) in __sys_setregid()
403 new->sgid = new->egid; in __sys_setregid()
404 new->fsgid = new->egid; in __sys_setregid()
417 SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) in SYSCALL_DEFINE2() argument
419 return __sys_setregid(rgid, egid); in SYSCALL_DEFINE2()
446 new->gid = new->egid = new->sgid = new->fsgid = kgid; in __sys_setgid()
448 new->egid = new->fsgid = kgid; in __sys_setgid()
737 long __sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) in __sys_setresgid() argument
747 kegid = make_kgid(ns, egid); in __sys_setresgid()
752 if ((egid != (gid_t) -1) && !gid_valid(kegid)) in __sys_setresgid()
761 (egid == (gid_t) -1 || (gid_eq(kegid, old->egid) && in __sys_setresgid()
767 !gid_eq(krgid, old->egid) && !gid_eq(krgid, old->sgid); in __sys_setresgid()
768 egid_new = egid != (gid_t) -1 && !gid_eq(kegid, old->gid) && in __sys_setresgid()
769 !gid_eq(kegid, old->egid) && !gid_eq(kegid, old->sgid); in __sys_setresgid()
771 !gid_eq(ksgid, old->egid) && !gid_eq(ksgid, old->sgid); in __sys_setresgid()
782 if (egid != (gid_t) -1) in __sys_setresgid()
783 new->egid = kegid; in __sys_setresgid()
786 new->fsgid = new->egid; in __sys_setresgid()
799 SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) in SYSCALL_DEFINE3() argument
801 return __sys_setresgid(rgid, egid, sgid); in SYSCALL_DEFINE3()
808 gid_t rgid, egid, sgid; in SYSCALL_DEFINE3() local
811 egid = from_kgid_munged(cred->user_ns, cred->egid); in SYSCALL_DEFINE3()
816 retval = put_user(egid, egidp); in SYSCALL_DEFINE3()
893 if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || in __sys_setfsgid()
1636 gid_eq(cred->gid, tcred->egid) && in check_prlimit_permission()