smb2_file_rename_information must check that the file has been opened with DELETE Access ...

Jeremy Allison jra at
Thu Nov 15 14:50:11 MST 2012

On Thu, Nov 15, 2012 at 10:40:02PM +0100, Christian Ambach wrote:
> Hi Jeremy,
> On 11/14/2012 11:54 PM, Jeremy Allison wrote:
> >>Do we have an existing piece in the smb2 torture tests that shows that
> >>this necessary? If there is a test in place, I think the patch is valid.
> >
> >Yep, we already have such a test. Check out smb2.rename - and we have:
> >
> >selftest/knownfail:^samba3.smb2.rename.*.simple_nodelete
> >selftest/knownfail:^samba3.smb2.rename.*.no_share_delete_no_delete_access
> >
> >So I think we can scratch some of these knownfails off the list with this
> >fix :-).
> So you decided to put it in the sharemode check that you considered to
> be unnecessary in Bug 8412? Good to hear that :)

Not quite :-). It's still unnecessary for 99.9999% of cases :-).
This change isn't that, but the one for the second error will be :-).

> I was the one who wrote most of these tests to show that the fix was not
> complete (but also make sure we don't fail with MS Word again).

Thanks - it's much appreciated. The real issue is that the
tests open the containing directory with access masks of
FILE_READ_DATA|FILE_WRITE_DATA, which cause share modes
to be checked - something I don't think *any* windows
clients ever do against a directory handle (the MS Word
test you wrote certainly doesn't) as any requests for
reads and writes on the raw directory handle will be
rejected anyway.


More information about the samba-technical mailing list