commit b7c2d37758810d5071d57f6769bacdc53c1d2e61 from: Omar Polo date: Sun Feb 13 11:29:16 2022 UTC fix twstat handling of mode bits twstat was truncating out the user mode bits. Found the hard way by cage. commit - 776b1953c934661854cdcb56d34774efc93b9f39 commit + b7c2d37758810d5071d57f6769bacdc53c1d2e61 blob - 630a3d5ddd988150334f2fe5d7f1f6dcbde333e7 blob + d5ce6a7555e5b43d98bdb6fa2baa38cae922aece --- kamid/client.c +++ kamid/client.c @@ -1684,7 +1684,7 @@ twstat(struct np_msg_header *hdr, const uint8_t *data, /* change the permissions */ if (st.mode != (uint32_t)-1) { - mode_t m = st.mode & 0x7F; /* silently truncate higer bits */ + mode_t m = st.mode & 0x7FF; /* silently truncate higer bits */ if (f->fd != -1) r = fchmod(f->fd, m); else