parent_dirname_compatible_open perhaps doing incorrect test or returning incorrect result
Jeremy Allison
jra at samba.org
Thu Nov 15 13:47:47 MST 2012
On Thu, Nov 15, 2012 at 11:06:52AM -0800, Richard Sharpe wrote:
> Hi folks,
>
> in source3/smbd/reply.c:parent_dirname_compatible_open, which is
> called from rename_internals_fsp, we see the following code in
> V3-6-test and master:
>
> id = vfs_file_id_from_sbuf(conn, &smb_fname_parent.st);
> for (fsp = file_find_di_first(conn->sconn, id); fsp;
> fsp = file_find_di_next(fsp)) {
> if (fsp->access_mask & DELETE_ACCESS) {
> DEBUG(10, ("sharing viol on %s: access: %0X\n",
> smb_fname_str_dbg(fsp->fsp_name),
> fsp->access_mask));
> return NT_STATUS_SHARING_VIOLATION;
> }
> }
> return NT_STATUS_OK;
>
> This code is confusing and is seemingly causing the smb2.streams
> rename subtest to fail:
>
> failure: rename [
> (../source4/torture/smb2/streams.c:1224) RENAME_INFORMATION -
> NT_STATUS_SHARING_VIOLATION (should be NT_STATUS_OK)
> ]
>
> It looks like it should require DELETE_ACCESS, but that is already
> tested elsewhere.
>
> Perhaps it should be testing that SHARE_DELETE is available?
>
> Maybe this is something Jeremy is already working on.
Yes, this is something I'm working on :-).
The fix is in this function, as it's not quite right,
but at least I now understand what needs changing.
I should have something that passes all the smb2.rename
tests later today. Watch this space :-).
Jeremy.
More information about the samba-technical
mailing list