Error status correction in OpenById path.

Kenny Dinh kdinh at peaxy.net
Mon Apr 27 19:03:14 MDT 2015


Hi all,

We were running IFSTest's "FileOpenByIDTest".  The test expects Samba to
return STATUS_NOT_SUPPORTED but Samba was returning
STATUS_OBJECT_NAME_INVALID.  The incorrect error code came from a check at
"smbd_smb2_request_process_create" in source3\smbd\smb2_create.c

if (strlen(in_name_string) != in_name_string_size) {
return smbd_smb2_request_error(smb2req, NT_STATUS_OBJECT_NAME_INVALID);
}

In the case of FILE_OPEN_BY_FILE_ID, the file name length specified in the
SMB request is larger than the actual length of the file name (of the
parent directory).  My thought is that the file name length validation is
not applicable to OpenById.

Could someone verify if the attached patch is valid and should be pulled
upstream?

Thanks,
Kenny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open_by_id_patch
Type: application/octet-stream
Size: 533 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150427/083099be/attachment.obj>


More information about the samba-technical mailing list