[PATCH v4] vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLs

Christopher R. Hertel crh at ubiqx.mn.org
Tue Aug 13 21:32:03 MDT 2013


On Mon, Aug 12, 2013 at 05:11:30PM -0700, Jeremy Allison wrote:
> On Mon, Aug 12, 2013 at 04:48:45PM -0700, Anand Avati wrote:
> > On 08/11/2013 10:23 PM, Andrew Bartlett wrote:
> > >On Sun, 2013-08-11 at 15:59 -0400, Anand Avati wrote:
> > >>Use the primitives available in Samba byteorder.h for implementing
> > >>proper (un)marshalling of ACL xattrs.
> > >
> > >I'll preface this by saying I know how painful it is when every man and
> > >his dog has a different view on how something should be implemented, but
> > >anyway:
> > >
> > >I think this would be better done in IDL.  In general, Samba has moved
> > >from hand-marshalling to IDL for everything that isn't totally silly to
> > >do that way (and even then, we fit those into IDL most of the time).
> > >
> > >Could you try adding this to smb_acl.idl instead, and then using the
> > >generated the pull/push functions?
> > >
> > >This is much less error prone than hand-marshaling, and comes with free
> > >pretty-printers and the ability to trivially manipulate the objects in
> > >python, if you ever need that.
> > >
> > >Thanks,
> > >
> > >Andrew Bartlett
> > >
> > 
> > Andrew,
> >  Thanks for your comments. I am new to the IDL syntax used in Samba,
> > and still trying to understand how it works. While that is
> > definitely a better approach and for long term maintainability, this
> > patch is fixing a bug. Can we view them as two separate tasks? I
> > will post the IDL conversion patch as soon as I wrap my head around
> > how that works. In the mean time fixing this bug will be good
> > progress, independently. Please let me know if you agree with the
> > approach, and if so, any comments on the patch itself?
> 
> Anand,
> 
> 	Whilst Andrew is right (we shouldn't be adding more
> hand-marshalled code into Samba) I appreciate the immediacy
> of the bug fix, and yes we should treat them as two different
> things :-).
> 
> At first glance the code looks like it does exactly what
> I'd hoped for - thanks very much !
> 
> I should be able to do a more formal review tomorrow.
> 
> Cheers,
> 
> 	Jeremy.

Jeremy,

Still looking for your insights and, perhaps, approval.

Chris -)-----


More information about the samba-technical mailing list