interprocess
interprocess copied to clipboard
Wrong type in encode for credentials
When encoding the credentials the wrong type is used in the structure https://github.com/kotauskas/interprocess/blob/master/src/os/unix/udsocket/ancillary.rs#L116
#[cfg(uds_ucred)]
AncillaryData::Credentials { pid, uid, gid } => {
cmsg_type_bytes = SCM_RIGHTS.to_ne_bytes();
cmsg_len += size_of::<ucred>();
should be
#[cfg(uds_ucred)]
AncillaryData::Credentials { pid, uid, gid } => {
cmsg_type_bytes = SCM_CREDENTIALS.to_ne_bytes();
cmsg_len += size_of::<ucred>();
Commit reference: https://github.com/ETKNeil/interprocess/commit/6df827e405294ff45e3cea1ea2aa903dfc7b3f8d