Questions about smbd option "strict rename"

Ralph Boehme rb at sernet.de
Wed Nov 25 17:15:19 UTC 2015


On Wed, Nov 25, 2015 at 08:57:52AM -0800, Jeremy Allison wrote:
> On Wed, Nov 25, 2015 at 03:50:25PM +0100, Ralph Boehme wrote:
> > On Tue, Nov 24, 2015 at 10:01:11AM -0800, Jeremy Allison wrote:
> > > On Tue, Nov 24, 2015 at 06:50:47PM +0100, Ralph Boehme wrote:
> > > > Jeremy, how to proceed wrt that attaching POSIX rename behaviour to
> > > > POSIX pathnames is wrong imo. We need a seperate flag for this.
> > > 
> > > I don't think it is wrong. We have behaved that way
> > > for a *very* long time and in the same way we
> > > attach POSIX delete behavior to POSIX pathnames
> > > too. Changing that will break UNIX extensions.
> > 
> > sorry if you got the impression I would want to change semantics, I
> > don't! I merely want to tweak the internal handling by allowing more
> > fine grained control *without* changing existing CIFS UNIX extensions.
> > 
> > > Now you might want an additional flag in order to
> > > get POSIX-rename (and maybe POSIX-delete) behavior
> > > for MacOSX clients that don't currently negotiate
> > > UNIX extensions, but that's different from changing
> > > the current smbd behavior.
> > 
> > Again, I don't want to change existing behaviour.
> > 
> > Maybe the attached patch makes clearer what I have in mind.
> 
> Oh, that makes much more sense, thanks !

:)

> I still have adding fields into files_struct
> as a kitchen sink for underlying behavior.

Maybe add a uint64_t for flags, ie "uint64_t posix_flags" ? Just
thinking loud.

> Maybe we can add one linked list pointer,
> instead, allowing enhancements to files struct
> to be added by underlying VFS modules -
> essentially a way for VFS modules to request
> specific behavior from the upper layer code.

This should also cover SMB2/3 UNIX extensions where we agreed to add
per file handle capability flags anyway iirc. I mean, in the end it
may turn out that just enabling posix_open in fruit might be the right
thing to do, but I'm just too scared as to what else that may break
(for the client) because it changes semantics in so many ways. Ideally
someone would spend a few months writing tests that check what OS X
server does in all areas where enabling posix_open changes
semantics. :(

> But I'm off for US Thanksgiving right now so this might be a
> confused mess as I'm juggling turkey and cooking tasks :-).

:)

Thanks!
-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de



More information about the samba-technical mailing list