Error status correction in OpenById path.
Jeremy Allison
jra at samba.org
Tue Apr 28 13:41:59 MDT 2015
On Mon, Apr 27, 2015 at 06:03:14PM -0700, Kenny Dinh wrote:
> 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?
I'm not too keen on this as it removes a paranoia check
for the FILE_OPEN_BY_FILE_ID case. If we're going to add
it I'd like an equivalent paranoia check for FILE_OPEN_BY_FILE_ID.
More information about the samba-technical
mailing list