[PATCH] vfs_glusterfs: Make sure posix acls are formatted "before setting"/"after getting"
Jeremy Allison
jra at samba.org
Mon Aug 12 09:57:03 MDT 2013
On Fri, Aug 09, 2013 at 09:21:32PM -0400, Simo wrote:
>
> #pragma pack(1)
> struct gluster_ace {
> uint16_t tag;
> uint16_t perm;
> uint32_t id;
> };
>
> struct gluster_acl_header {
> uint32_t version;
> struct gluster_ace entries[];
> };
> #pragma pack()
>
> Given there are no pointers in these structures and the type of the
> members has the same size on any (sane) architecture, it should work
> just fine.
>
> The only problem is that you still need to care for bigendian vs little
> endian when storing the 3 values.
I know about #pragma pack. However in Samba we
have never depended on compiler pragma's to be
portable before, and I don't want to start now.
I'd prefer this be done properly.
Jeremy.
More information about the samba-technical
mailing list