diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 790c84b24..7855a004d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,6 +129,7 @@ jobs: # inconsistent syntax between shell and powershell. shell: bash run: | + cd libs # Parse out what we just built and upload it to the Github Releaseā„¢ echo "paths<> "$GITHUB_OUTPUT" jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT" diff --git a/libs/gl-signerproxy/src/passfd.rs b/libs/gl-signerproxy/src/passfd.rs index 5de734f4c..884443eb4 100644 --- a/libs/gl-signerproxy/src/passfd.rs +++ b/libs/gl-signerproxy/src/passfd.rs @@ -1,7 +1,7 @@ use libc::{self, c_int, c_uchar, c_void, msghdr}; -use std::mem; use log::trace; use std::io::{Error, ErrorKind}; +use std::mem; use std::os::unix::io::RawFd; pub trait SyncFdPassingExt { @@ -80,15 +80,16 @@ impl SyncFdPassingExt for RawFd { 0 => Err(Error::new(ErrorKind::UnexpectedEof, "0 bytes read")), rv if rv < 0 => Err(Error::last_os_error()), rv if rv == mem::size_of::() as isize => { - let hdr: *mut libc::cmsghdr = - if msg.msg_controllen >= mem::size_of::() as _ { - msg.msg_control as *mut libc::cmsghdr - } else { - return Err(Error::new( - ErrorKind::InvalidData, - "bad control msg (header)", - )); - }; + let hdr: *mut libc::cmsghdr = if msg.msg_controllen as usize + >= mem::size_of::() as usize + { + msg.msg_control as *mut libc::cmsghdr + } else { + return Err(Error::new( + ErrorKind::InvalidData, + "bad control msg (header)", + )); + }; if (*hdr).cmsg_level != libc::SOL_SOCKET || (*hdr).cmsg_type != libc::SCM_RIGHTS { return Err(Error::new( @@ -96,7 +97,7 @@ impl SyncFdPassingExt for RawFd { "bad control msg (level)", )); } - if msg.msg_controllen + if msg.msg_controllen as usize != libc::CMSG_SPACE(mem::size_of::() as u32) as usize { return Err(Error::new(ErrorKind::InvalidData, "bad control msg (len)"));