Some interop notes

Moritz Bechler bechler at agno3.eu
Thu Jun 8 13:46:12 UTC 2017


Hi,

I've been recently adding SMB2 support to our fork of jcifs. I started
out very aggressively compounding related requests and noticed two
instances where samba errs out on these (the MS impl doesn't and as far
as I am reading the spec these should be perfectly legal):

- SMB2_SESSION_SETUP + SMB2_TREE_CONNECT fails (SESSION_SETUP) with
INTERNAL_ERROR (while it should/would be possible at least for the final
request). This can only happen if multiple session are established as
samba only starts granting multiple credits later. Source of this seems
(debugging samba seems kind of non-trivial, can't get any meaningful
breakpoint to work even in single process mode) to be the SMB2_CREATE
check in smbd_smb2_request_pending_queue. I'm not quite sure why all of
these async checks are applied in such a general way but there already
seems to be a bypass flag for other cases (async_internal).

- SMB2_TREE_CONNECT + SMB2_IOCTL (FSCTL that does not need FileID - e.g.
FSCTL_DFS_GET_REFERRALS) fails (the IOCTL) with NETWORK_NAME_DELETED.
Looks like it is unable to get the TreeID from the previous response.


And some unrelated older notes while I'm at it:

- The DFS implementation seems to behave a bit differently from the MS
one in that it will return consumedPath values that include a trailing
separator of the request path while MS impls never seem to do this.

- NT_TRANSACT_NOTIFY_CHANGE won't return when closing the associated FID
but only on explicit CANCEL. I can't find it anymore but I'm pretty sure
that even was specified somewhere.


Do you like me to open bugs for these?


regards

Moritz

-- 
AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
Persönlich haftend:
Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
Vertreten durch Joachim Keltsch



More information about the samba-technical mailing list