Lines Matching refs:Uid
73 pub struct Uid(uid_t);
75 impl Uid { impl
78 Uid(uid)
104 impl From<Uid> for uid_t {
105 fn from(uid: Uid) -> Self {
110 impl From<uid_t> for Uid {
112 Uid(uid)
116 impl fmt::Display for Uid {
123 pub const ROOT: Uid = Uid(0);
698 fn chown_raw_ids(owner: Option<Uid>, group: Option<Gid>) -> (libc::uid_t, libc::gid_t) {
717 pub fn chown<P: ?Sized + NixPath>(path: &P, owner: Option<Uid>, group: Option<Gid>) -> Result<()> {
734 pub fn fchown(fd: RawFd, owner: Option<Uid>, group: Option<Gid>) -> Result<()> {
772 owner: Option<Uid>,
1408 pub fn getuid() -> Uid {
1409 Uid(unsafe { libc::getuid() })
1418 pub fn geteuid() -> Uid {
1419 Uid(unsafe { libc::geteuid() })
1446 pub fn seteuid(euid: Uid) -> Result<()> {
1466 pub fn setuid(uid: Uid) -> Result<()> {
1491 pub fn setfsuid(uid: Uid) -> Uid {
1493 Uid::from_raw(prev_fsuid as uid_t)
2778 use super::{Uid, Gid};
2790 pub fn setresuid(ruid: Uid, euid: Uid, suid: Uid) -> Result<()> {
2827 use super::{Uid, Gid};
2832 pub real: Uid,
2833 pub effective: Uid,
2834 pub saved: Uid
2861 … Errno::result(res).map(|_| ResUid{ real: Uid(ruid), effective: Uid(euid), saved: Uid(suid) })
2974 pub uid: Uid,
3024 uid: Uid::from_raw(pw.pw_uid),
3157 pub fn from_uid(uid: Uid) -> Result<Option<Self>> {
3352 pub fn getpeereid(fd: RawFd) -> Result<(Uid, Gid)> {
3358 Errno::result(ret).map(|_| (Uid(uid), Gid(gid)))