search for: ndr_scalars

Displaying 1 result from an estimated 1 matches for "ndr_scalars".

2023 Nov 21
0
is it safe to encode/decode uid_t/gid_t in 4 bytes?
Hi, Samba internally uses 8 bytes to encode/decode uid_t/gid_t, e.g., _PUBLIC_ enum ndr_err_code ndr_push_uid_t(struct ndr_push *ndr, int ndr_flags, uid_t u) { NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)u); } I want to know if it is safe to use 4 bytes to reduce the size in storing security_info in tdb. I am not aware of if there is any platform on which uid_t or gid_t is 64bits, and it seems that the encoded data is not sent over the network. Thanks,