[PATCH] vfs:recycle: Inherit NT ACLs

Kamen Mazdrashki kamenim at samba.org
Sun Jun 29 13:31:44 MDT 2014


Hi Jeremy,


On Sat, Jun 28, 2014 at 1:18 AM, Jeremy Allison <jra at samba.org> wrote:

> On Tue, Jun 24, 2014 at 12:36:34AM +0200, Kamen Mazdrashki wrote:
> > Hi Jeremy, Metze, Nadya,
> >
> > Could you please take a look at following patch from Samuel?
> > It allows for acl inheritance in vfs_recycle module.
> > http://git.samba.org/?p=kamenim/
> > samba.git;a=commitdiff;h=468bf399bea2c76d0c0f9cd4fc5d7e6df85f14c4
> >
> > Also attached to this email.
>
> Hi Kamen,
>
> This bit :
>
> > +     /* Generate files_struct for dir */
> > +     mode = 00400;
> > +
> > +     fsp = talloc_zero(frame, struct files_struct);
> > +     if (fsp == NULL) {
> > +             TALLOC_FREE(frame);
> > +             return NT_STATUS_NO_MEMORY;
> > +     }
> > +     fsp->fh = talloc_zero(fsp, struct fd_handle);
> > +     if (fsp->fh == NULL) {
> > +             TALLOC_FREE(frame);
> > +             return NT_STATUS_NO_MEMORY;
> > +     }
> > +     fsp->conn = handle->conn;
> > +     smb_fname = synthetic_smb_fname_split(frame, dir, NULL);
>
> etc. etc. is *massively* ugly :-). Let me spend
> some time thinking if this is remotely allowable,
> or violates all manner of layers within the file
> server (I'm tending towards the latter :-).
>
> ;-D thanks

I think you're going to have to go through
> SMB_VFS_CREATE_FILE() here...
>
> metze said same think so it needs rework.

What do you think for the approach?
Should we keep original ACLs on directories + inherit ACLs
or just inheriting ACLs is OK.

With best regards,
Kamen


More information about the samba-technical mailing list