The Samba-Bugzilla – Bug 13176
POSIX ACL support is broken on hpux and possibly other big-endian OSs
Last modified: 2017-12-07 07:58:53 UTC
This was reported in https://lists.samba.org/archive/samba-technical/2016-November/117232.html , then in https://bugzilla.samba.org/show_bug.cgi?id=11490#c4 (but is not part of that original bug) and re-confirmed recently in https://lists.samba.org/archive/samba-technical/2017-November/124009.html
On big-endian systems, in which mode_t is defined to be a 16-bit value (BSD variants), POSIX ACL is broken, because it returns that all ACL entries have no permissions, preventing file access from any non-admin user.
Some pointer casting causes sys_acl_get_permset() function in SMBD code to return a pointer to a uint32_t field, which is later interpreted as a mode_t pointer. If mode_t is 16 bits and the system is little-endian, the code looks at the wrong bits.
On Linux mode_t is 32 bits.
Created attachment 13846 [details]
proposed fix for master
Created attachment 13847 [details]
proposed fix for 4.5.x