From 6cc90b31e23b0b98bd9fa194fed041f4c413077d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 1 Dec 2019 16:08:54 -0700 Subject: ScmCredentials now wraps UnixCredentials instead of libc::ucred --- test/sys/test_socket.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/sys') diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs index 13d7b6b0..bd5c373b 100644 --- a/test/sys/test_socket.rs +++ b/test/sys/test_socket.rs @@ -561,7 +561,7 @@ fn test_scm_credentials() { pid: getpid().as_raw(), uid: getuid().as_raw(), gid: getgid().as_raw(), - }; + }.into(); let cmsg = ControlMessage::ScmCredentials(&cred); assert_eq!(sendmsg(send, &iov, &[cmsg], MsgFlags::empty(), None).unwrap(), 5); close(send).unwrap(); @@ -577,9 +577,9 @@ fn test_scm_credentials() { for cmsg in msg.cmsgs() { if let ControlMessageOwned::ScmCredentials(cred) = cmsg { assert!(received_cred.is_none()); - assert_eq!(cred.pid, getpid().as_raw()); - assert_eq!(cred.uid, getuid().as_raw()); - assert_eq!(cred.gid, getgid().as_raw()); + assert_eq!(cred.pid(), getpid().as_raw()); + assert_eq!(cred.uid(), getuid().as_raw()); + assert_eq!(cred.gid(), getgid().as_raw()); received_cred = Some(cred); } else { panic!("unexpected cmsg"); @@ -641,7 +641,7 @@ fn test_impl_scm_credentials_and_rights(mut space: Vec) { pid: getpid().as_raw(), uid: getuid().as_raw(), gid: getgid().as_raw(), - }; + }.into(); let fds = [r]; let cmsgs = [ ControlMessage::ScmCredentials(&cred), @@ -669,9 +669,9 @@ fn test_impl_scm_credentials_and_rights(mut space: Vec) { } ControlMessageOwned::ScmCredentials(cred) => { assert!(received_cred.is_none()); - assert_eq!(cred.pid, getpid().as_raw()); - assert_eq!(cred.uid, getuid().as_raw()); - assert_eq!(cred.gid, getgid().as_raw()); + assert_eq!(cred.pid(), getpid().as_raw()); + assert_eq!(cred.uid(), getuid().as_raw()); + assert_eq!(cred.gid(), getgid().as_raw()); received_cred = Some(cred); } _ => panic!("unexpected cmsg"), -- cgit v1.2.3