Lines Matching refs:gid
983 * Unprivileged users may change the real gid to the effective gid
986 * If you set the real gid at all, or set the effective gid to a value not
987 * equal to the real gid, then the saved gid is set to the new effective gid.
1002 int old_rgid = current->gid;
1038 current->gid = new_rgid;
1049 asmlinkage long sys_setgid(gid_t gid)
1054 retval = security_task_setgid(gid, (gid_t)-1, (gid_t)-1, LSM_SETID_ID);
1059 if (old_egid != gid) {
1063 current->gid = current->egid = current->sgid = current->fsgid = gid;
1064 } else if ((gid == current->gid) || (gid == current->sgid)) {
1065 if (old_egid != gid) {
1069 current->egid = current->fsgid = gid;
1286 if ((rgid != (gid_t) -1) && (rgid != current->gid) &&
1289 if ((egid != (gid_t) -1) && (egid != current->gid) &&
1292 if ((sgid != (gid_t) -1) && (sgid != current->gid) &&
1305 current->gid = rgid;
1318 if (!(retval = put_user(current->gid, rgid)) &&
1361 asmlinkage long sys_setfsgid(gid_t gid)
1366 if (security_task_setgid(gid, (gid_t)-1, (gid_t)-1, LSM_SETID_FS))
1369 if (gid == current->gid || gid == current->egid ||
1370 gid == current->sgid || gid == current->fsgid ||
1372 if (gid != old_fsgid) {
1376 current->fsgid = gid;