Lines Matching refs:sgid
400 gid_eq(old->sgid, kegid) || in __sys_setregid()
409 new->sgid = new->egid; in __sys_setregid()
452 new->gid = new->egid = new->sgid = new->fsgid = kgid; in __sys_setgid()
453 else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) in __sys_setgid()
764 long __sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) in __sys_setresgid() argument
775 ksgid = make_kgid(ns, sgid); in __sys_setresgid()
781 if ((sgid != (gid_t) -1) && !gid_valid(ksgid)) in __sys_setresgid()
790 (sgid == (gid_t) -1 || gid_eq(ksgid, old->sgid))) in __sys_setresgid()
794 !gid_eq(krgid, old->egid) && !gid_eq(krgid, old->sgid); in __sys_setresgid()
796 !gid_eq(kegid, old->egid) && !gid_eq(kegid, old->sgid); in __sys_setresgid()
797 sgid_new = sgid != (gid_t) -1 && !gid_eq(ksgid, old->gid) && in __sys_setresgid()
798 !gid_eq(ksgid, old->egid) && !gid_eq(ksgid, old->sgid); in __sys_setresgid()
811 if (sgid != (gid_t) -1) in __sys_setresgid()
812 new->sgid = ksgid; in __sys_setresgid()
826 SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) in SYSCALL_DEFINE3() argument
828 return __sys_setresgid(rgid, egid, sgid); in SYSCALL_DEFINE3()
835 gid_t rgid, egid, sgid; in SYSCALL_DEFINE3() local
839 sgid = from_kgid_munged(cred->user_ns, cred->sgid); in SYSCALL_DEFINE3()
845 retval = put_user(sgid, sgidp); in SYSCALL_DEFINE3()
921 gid_eq(kgid, old->sgid) || gid_eq(kgid, old->fsgid) || in __sys_setfsgid()
1671 gid_eq(cred->gid, tcred->sgid) && in check_prlimit_permission()