Update POSIX negotiate context during negprot to include GUID
Stefan Metzmacher
metze at samba.org
Mon Feb 25 07:43:33 UTC 2019
Am 25.02.19 um 08:26 schrieb Steve French via samba-technical:
> On Mon, Feb 25, 2019 at 1:22 AM Stefan Metzmacher <metze at samba.org> wrote:
>>
>> Am 25.02.19 um 01:01 schrieb Steve French via samba-technical:
>>> As requested - updated the POSIX negotiate context to include the GUID
>>> of the only supported POSIX open/create context.
>>>
>>> Let me know if any objections..
>>
>> Don't you need to change POSIX_CTXT_DATA_LEN?
>
> Isn't 16 bytes correct (at least one GUID - in this case matching the
> POSIX open context GUID)? The patch included this change:
>
> -#define POSIX_CTXT_DATA_LEN 8
> +#define POSIX_CTXT_DATA_LEN 16
>
Yes, that correct, I missed that sorry.
Does your client still work without that chance, just sending 8 zero
bytes? Or does that fail?
I guess it will fail at
+ if ((inbuflen % 16) != 0) {
+ return smbd_smb2_request_error(
+ req, NT_STATUS_INVALID_PARAMETER);
+ }
I think we need to have something like this before:
static const uint64_t reserved64;
DATA_BLOB reserved = data_blob_const(&reserved64,
sizeof(reserved6464));
int cmp;
cmp = data_blob_cmp(&in_posix->data, &reserved_value);
if (cmp == 0) {
inbuf = (const uint8_t *)SMB2_CREATE_TAG_POSIX;
inbuflen = 16;
outbuf = reserved.blob;
outbuflen = reserved.length;
}
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190225/bb219a80/signature.sig>
More information about the samba-technical
mailing list