Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I know this is just yet another iteration, but I like this one much better than
the one that exists right now :-)
It will do trans and echo requests without a _recv helper and without
unnecessary memcpy().
|
|
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Fixed.
It turns out there were a number of places where cli_resolve_path() was called
and the error path upon that function failing did not set errno. There were a
couple of places the failure handling code did set errno to ENOENT, so I made
them all consistent, although I think better errno choices for this condition
exist, e.g. EHOSTUNREACH.
Derrell
|
|
match_mailslot_name
|
|
ntlmssp_seal_packet creates its own signature data blob, which we then
have to free.
Jeremy, please check and merge appropriately (Yes, I'm asking you to do the
janitor work, I want you to *look* at this :-))
Volker
|
|
Signed-off-by: Günther Deschner <gd@samba.org>
|
|
We store the seqnum/mid mapping in the cli_request structure
for async requests and in the cli_state structure for sync calls.
We skip the signing check for oplock requests while waiting
for async requests coming in.
metze
|
|
We keep the seqnum/mid mapping in the smb_request structure.
This also moves one global variable into the
smbd_server_connection struct.
metze
|
|
It's the job of the caller to maintain the seqnum/mid mapping.
Hopefully we can use this code in s4 later too.
metze
|
|
This prepares a large simplification of the smb_signing code
metze
|
|
|
|
Guenther
|
|
|
|
Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...
metze
|
|
Before we send the secondary requests we need to remove the
old mid=>seqnum mapping and reset cli->mid and make the new
mid=>seqnum mapping "persistent".
The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli->mid
and the secondary requests used the incremented mid,
but as cli->outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.
cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().
The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.
metze
|
|
selected (we need to path in pathname /that/look/like/this).
Jeremy.
|
|
Guenther
|
|
callers pass in a struct user_auth_info * instead. This commit causes
smbc_set_credentials() to print out a message telling callers to use
smbc_set_credentials_with_fallback() instead, as smbc_set_credentials()
has a broken API (no SMBCCTX * pointer). No more global variables used
in the connection manager API for client dfs calls.
Jeremy.
|
|
|
|
|
|
password talloc'ed strings within the cli_struct.
Jeremy.
|
|
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.
|
|
buffers"
This reverts commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.
It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.
We can readd a extra function later.
metze
|
|
metze
|
|
metze
|
|
There were the following problems:
1.) if window_size was a multiple of the chunk_size,
we silently dropped the last truncated chunk.
2.) if window_size was 0 pushed only the first chunk
to the server and silently dropped the rest.
3.) we had only transferred state->num_reqs writes,
even if there would be more data to send.
metze
|
|
|
|
|
|
metze
|
|
*cli_initialise_ex()
This prepares the next changes.
metze
|
|
[MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum
is incremented by only for ntcancel requests for any other
request it's by incremented by 2, even if it doesn't expect
a response.
metze
|
|
This is only cosmetic, but it makes it easier to understand.
metze
|
|
|
|
Jeremy.
|
|
- Use const in function signatures whenever appropriate, to help prevent
errant scribbling on users' buffers. smbc_set_credentials() always acted as
if its formal parameters were const char *, and changing the formal
declaration to specify that should not cause any change to the ABI. It is
still allowable to pass a writable buffer to a function which specifies that
it will not write to the buffer.
I'm making this change only in master.
Derrell
|
|
|