Lines Matching refs:egid
365 long __sys_setregid(gid_t rgid, gid_t egid) in __sys_setregid() argument
374 kegid = make_kgid(ns, egid); in __sys_setregid()
378 if ((egid != (gid_t) -1) && !gid_valid(kegid)) in __sys_setregid()
389 gid_eq(old->egid, krgid) || in __sys_setregid()
395 if (egid != (gid_t) -1) { in __sys_setregid()
397 gid_eq(old->egid, kegid) || in __sys_setregid()
400 new->egid = kegid; in __sys_setregid()
406 (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) in __sys_setregid()
407 new->sgid = new->egid; in __sys_setregid()
408 new->fsgid = new->egid; in __sys_setregid()
421 SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) in SYSCALL_DEFINE2() argument
423 return __sys_setregid(rgid, egid); in SYSCALL_DEFINE2()
450 new->gid = new->egid = new->sgid = new->fsgid = kgid; in __sys_setgid()
452 new->egid = new->fsgid = kgid; in __sys_setgid()
757 long __sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) in __sys_setresgid() argument
766 kegid = make_kgid(ns, egid); in __sys_setresgid()
771 if ((egid != (gid_t) -1) && !gid_valid(kegid)) in __sys_setresgid()
784 !gid_eq(krgid, old->egid) && !gid_eq(krgid, old->sgid)) in __sys_setresgid()
786 if (egid != (gid_t) -1 && !gid_eq(kegid, old->gid) && in __sys_setresgid()
787 !gid_eq(kegid, old->egid) && !gid_eq(kegid, old->sgid)) in __sys_setresgid()
790 !gid_eq(ksgid, old->egid) && !gid_eq(ksgid, old->sgid)) in __sys_setresgid()
796 if (egid != (gid_t) -1) in __sys_setresgid()
797 new->egid = kegid; in __sys_setresgid()
800 new->fsgid = new->egid; in __sys_setresgid()
813 SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) in SYSCALL_DEFINE3() argument
815 return __sys_setresgid(rgid, egid, sgid); in SYSCALL_DEFINE3()
822 gid_t rgid, egid, sgid; in SYSCALL_DEFINE3() local
825 egid = from_kgid_munged(cred->user_ns, cred->egid); in SYSCALL_DEFINE3()
830 retval = put_user(egid, egidp); in SYSCALL_DEFINE3()
907 if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || in __sys_setfsgid()
1657 gid_eq(cred->gid, tcred->egid) && in check_prlimit_permission()