Lines Matching refs:guard
317 let mut guard = pcb.cred.lock(); in setuid() localVariable
319 if guard.uid.data() == 0 { in setuid()
320 guard.setuid(uid); in setuid()
321 guard.seteuid(uid); in setuid()
322 guard.setsuid(uid); in setuid()
323 } else if uid == guard.uid.data() || uid == guard.suid.data() { in setuid()
324 guard.seteuid(uid); in setuid()
334 let mut guard = pcb.cred.lock(); in setgid() localVariable
336 if guard.egid.data() == 0 { in setgid()
337 guard.setgid(gid); in setgid()
338 guard.setegid(gid); in setgid()
339 guard.setsgid(gid); in setgid()
340 guard.setfsgid(gid); in setgid()
341 } else if guard.gid.data() == gid || guard.sgid.data() == gid { in setgid()
342 guard.setegid(gid); in setgid()
343 guard.setfsgid(gid); in setgid()
353 let mut guard = pcb.cred.lock(); in seteuid() localVariable
355 if euid == usize::MAX || (euid == guard.euid.data() && euid == guard.fsuid.data()) { in seteuid()
360 guard.seteuid(euid); in seteuid()
363 let euid = guard.euid.data(); in seteuid()
364 guard.setfsuid(euid); in seteuid()
371 let mut guard = pcb.cred.lock(); in setegid() localVariable
373 if egid == usize::MAX || (egid == guard.egid.data() && egid == guard.fsgid.data()) { in setegid()
378 guard.setegid(egid); in setegid()
381 let egid = guard.egid.data(); in setegid()
382 guard.setfsgid(egid); in setegid()
391 let mut guard = pcb.cred.lock(); in setfsuid() localVariable
392 let old_fsuid = guard.fsuid; in setfsuid()
394 if fsuid == guard.uid || fsuid == guard.euid || fsuid == guard.suid { in setfsuid()
395 guard.setfsuid(fsuid.data()); in setfsuid()
405 let mut guard = pcb.cred.lock(); in setfsgid() localVariable
406 let old_fsgid = guard.fsgid; in setfsgid()
408 if fsgid == guard.gid || fsgid == guard.egid || fsgid == guard.sgid { in setfsgid()
409 guard.setfsgid(fsgid.data()); in setfsgid()