Samba 4 torture test RAW-SFILEINFO/disposition_information test fails when running on Samba 3.5.x: # ./bin/smbtorture //<samba_IP>/Admin -U Admin%password RAW-SFILEINFO ... test disposition_information level (torture/raw/setfileinfo.c:341) DISPOSITION_INFORMATION - NT_STATUS_INVALID_HANDLE (should be NT_STATUS_OK) The reason of failure is inside call_trans2setfilepathinfo: when tran_call == TRANSACT2_SETPATHINFO==6 subcommand is handled, only file path is processed (fsp remains to be NULL), but then it calls smbd_do_setfilepathinfo with info_level == SMB_FILE_DISPOSITION_INFORMATION=1013, and afterwards call to smb_set_file_disposition_info expects that fsp is set (returns NT_STATUS_INVALID_HANDLE if fsp is NULL). I see also comment relevant to this bug from smbd_do_setfilepathinfo: #if 0 /* JRA - We used to just ignore this on a path ? * Shouldn't this be invalid level on a pathname * based call ? */ if (tran_call != TRANSACT2_SETFILEINFO) { return ERROR_NT(NT_STATUS_INVALID_LEVEL); } #endif status = smb_set_file_disposition_info(conn, ... It seems like TRANSACT2_SETPATHINFO was not supported by smbd_do_setfilepathinfo, but it was planned to handle this subrequest (so not only TRANSACT2_SETFILEINFO is allowed to enter smb_set_file_disposition_info); still required changes was not made, so smb_set_file_disposition_info fails because it still needs fsp (but we haven't it resolved for SETPATHINFO). Relevant logs (fnum=-1 is reported because fsp is not set): [2011/02/18 10:44:16.071223, 3, pid=29799] smbd/process.c:1300(switch_message) switch message SMBtrans2 (pid 29799) conn 0xf806daa0 ... [2011/02/18 10:44:16.073757, 3, pid=29799] smbd/vfs.c:1008(check_reduced_name) check_reduced_name: testsfileinfo/fname_test_67.txt reduced to /mnt/cifs_share/testsfileinfo/fname_test_67.txt [2011/02/18 10:44:16.073771, 3, pid=29799] smbd/trans2.c:7823(call_trans2setfilepathinfo) call_trans2setfilepathinfo(6) testsfileinfo/fname_test_67.txt (fnum -1) info_level=1013 totdata=4 [2011/02/18 10:44:16.073783, 3, pid=29799] smbd/trans2.c:7421(smbd_do_setfilepathinfo) smbd_do_setfilepathinfo: testsfileinfo/fname_test_67.txt (fnum -1) info_level=1013 totdata=4 [2011/02/18 10:44:16.073797, 3, pid=29799] smbd/error.c:80(error_packet_set) error packet at smbd/trans2.c(7860) cmd=50 (SMBtrans2) NT_STATUS_INVALID_HANDLE Thanks.