| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
req->private_data==NULL at this point is definitely a bug.
|
|
|
|
|
| |
Along the lines of cli_request_send this abstracts away the smb-level buffer
handling when parsing replies we got from the server.
|
|
|
|
|
| |
Storing the event_context as permanent state in struct cli_state creates more
complex code than necessary IMO.
|
|
|
|
|
| |
cli_request_send() is supposed to bundle all generic SMB-header handling. This
makes cli_request_new static to async_smb.c.
|
|
|
|
|
|
|
|
| |
This reverts commit 4ed73cbbbeff4b554cc8d28252b756241396b3a1.
... how did this end up here??
Volker
|
| |
|
| |
|
|
|
|
|
| |
can result in a buffer overrun.
Jeremy.
|
|
|
|
|
| |
be adhered to.
Jeremy.
|
|
|
|
|
|
| |
Thanks to Jason Mader!
Volker
|
|
|
|
| |
Jeremy.
|
| |
|
|
|
|
|
|
| |
Fix bug 5341, thanks a lot to Karoly Vegh for testing it!
Volker
|
|
|
|
|
| |
When reading from a pipe, Windows return STATUS_BUFFER_OVERFLOW which is *not*
an error.
|
|
|
|
| |
I did not test with a zero length file :-)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the big (and potentially controversial) one. It took a phone call to
explain to metze what is going on inside cli_pull_read_done, but I would really
like everybody to understand this function. It is a very good and reasonably
complex example of async programming. If we want more asynchronism in s3, this
is what we will have to deal with :-)
Make use of it in the smbclient "get" command.
Volker
|
|
|
|
|
|
| |
offset of zero if return size is zero. Should fix testread
libsmbclient code.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
negotiation works.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
sometimes uses a 12-word write and doesn't include a pad
byte (as Windows does). Fix this so that we are identical
to Windows clients. This will make recvfile processing
much easier to detect (as we can just read a standard
writeX header length to decide).
Jeremy.
|
|
|
|
|
|
|
| |
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
|
| |
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
data being sent). Patch from mnix@wanm.com.au.
Jeremy.
|
|
|
|
|
|
| |
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
|
|
|
|
|
|
|
| |
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
|
| |
|
|
|
|
|
| |
where if you ask for exactly 64k bytes it returns 0.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.
The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :
tmp = realloc(p, size);
if (!tmp) {
SAFE_FREE(p);
return error;
} else {
p = tmp;
}
However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :
p = realloc(p, size)
if (!p) {
return error;
}
which will leak the memory pointed to by p on realloc fail.
This commit (hopefully) fixes all these cases by moving to
a standard idiom of :
p = SMB_REALLOC(p, size)
if (!p) {
return error;
}
Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.
For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :
tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
if (!tmp) {
SAFE_FREE(p);
return error;
} else {
p = tmp;
}
SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).
It remains to be seen what this will do to our Coverity bug count :-).
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
|
| |
|
|
|
|
|
|
| |
Set the 14 word version of write if size > 0xffff as
well as 64-bit offset.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
|
|
| |
allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
|
|
|
|
|
| |
return a size_t, not an ssize_t, and we had better left shift the upper
part of the write count, not right shift it.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
<guenter.kukkukk@kukkukk.com>.
Bugid #1590.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
|
|
|
|
|
|
| |
warnings. (Adds a lot of const).
Andrew Bartlett
|
|
|
|
| |
Jeremy.
|
| |
|
|
|
|
| |
Jeremy.
|