Skip to content

Commit

Permalink
Merge pull request rust-lang#101 from maghoff/master
Browse files Browse the repository at this point in the history
Expose functionality to get peer credentials for a Unix socket on Linux
  • Loading branch information
alexcrichton committed Dec 16, 2015
2 parents 64da6d2 + 4b32065 commit 4920c7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/unix/notbsd/linux/other/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ s! {
__unused4: *mut ::c_void,
__unused5: *mut ::c_void,
}

pub struct ucred {
pub pid: ::pid_t,
pub uid: ::uid_t,
pub gid: ::gid_t,
}
}

pub const RLIMIT_RSS: ::c_int = 5;
Expand Down Expand Up @@ -164,6 +170,7 @@ pub const SO_KEEPALIVE: ::c_int = 9;
pub const SO_OOBINLINE: ::c_int = 10;
pub const SO_LINGER: ::c_int = 13;
pub const SO_REUSEPORT: ::c_int = 15;
pub const SO_PEERCRED: ::c_int = 17;
pub const SO_RCVLOWAT: ::c_int = 18;
pub const SO_SNDLOWAT: ::c_int = 19;
pub const SO_RCVTIMEO: ::c_int = 20;
Expand Down

0 comments on commit 4920c7e

Please sign in to comment.