smbtorture test smb2.rename failure

Shilpa K shilpa.krishnareddy at
Fri Feb 14 03:26:34 MST 2014


I was running one of the smbtorture tests, "smb2.rename". The following 2
sub tests under it are failing:

test: simple_nodelete)

time: 2014-02-13 23:26:16.812166

Creating base directory

Creating test file

Renaming test file

Cleaning up

time: 2014-02-13 23:26:16.931777

failure: simple_nodelete) [

(../source4/torture/smb2/rename.c:184) Incorrect status NT_STATUS_OK -


test: no_share_delete_no_delete_access

time: 2014-02-13 23:26:17.232758

Creating base directory

Opening parent directory

Creating test file

Renaming test file

Cleaning up

time: 2014-02-13 23:26:17.351722

failure: no_share_delete_no_delete_access [

(../source4/torture/smb2/rename.c:761) Incorrect status NT_STATUS_OK -


I think the first failed test "simple_nodelete" can be fixed by following
check in the routine can_rename() in reply.c:

if ((fsp->access_mask & (DELETE_ACCESS|FILE_WRITE_ATTRIBUTES)) ==

                return NT_STATUS_OK;


As for the second test, no_share_delete_no_delete_access which failed, I
tried to fix it by checking if the parent directory is opened without
FILE_SHARE_DELETE as per the comment in the smbtorture code:  "testing of
rename with no delete access on parent dir... parent dir is opened without
share_delete, so rename must fail". With the fix in place, smbd returns
STATUS_SHARING_VIOLATION if the parent directory is not opened for
FILE_SHARE_DELETE and so the test no_share_delete_no_delete_access() passes.

The side effect of the above fix is, the sub test "msword" which passed
earlier, fails. This is because msword test also opens the parent directory
without FILE_SHARE_DELETE option. I captured network traces of both the
tests and from the traces, I couldn't find any obvious difference between
these 2 tests when opening the parent directory as share access and access
mask seem to be compatible. Could you please let me know if I am missing
something while fixing the problem?



More information about the samba-technical mailing list