interprocess icon indicating copy to clipboard operation
interprocess copied to clipboard

Wrong type in encode for credentials

Open ETKNeil opened this issue 3 years ago • 0 comments

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

ETKNeil avatar Oct 05 '21 14:10 ETKNeil