summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clireadwrite.c
Commit message (Collapse)AuthorAgeFilesLines
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23148: Fix old old bug in cli_smbwrite() (not incrementingJeremy Allison2007-05-251-1/+1
| | | | | data being sent). Patch from mnix@wanm.com.au. Jeremy.
* r22920: Add in the UNIX capability for 24-bit readX, as discussedJeremy Allison2007-05-161-10/+38
| | | | | | with the Apple guys and Linux kernel guys. Still looking at how to do writeX as there's no recvfile(). Jeremy.
* r19798: reducing some diffs...bringing over ntlm_auth changesGerald Carter2006-11-191-2/+2
|
* r15164: grab a few more changes from SAMBA_3_0Gerald Carter2006-04-221-1/+5
|
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* r13119: Fix for #1779 from William Jojo <jojowil@hvcc.edu>Jeremy Allison2006-01-241-4/+6
| | | | Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2005-09-301-6/+6
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter2005-07-191-2/+0
|
* r4212: Ensure we only look at the bottom bit of large_readx.Jeremy Allison2004-12-151-5/+6
| | | | | | Set the 14 word version of write if size > 0xffff as well as 64-bit offset. Jeremy.
* r4188: Ensure we add in the upper length in the right place !Jeremy Allison2004-12-141-1/+1
| | | | Jeremy.
* r4186: Fix client & server to allow 127k READX calls.Jeremy Allison2004-12-141-1/+7
| | | | Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-2/+2
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2959: If we want to support writes >= 65536 with cli_write, then it had betterRichard Sharpe2004-10-141-4/+4
| | | | | 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.
* r2373: Fix typo.Jeremy Allison2004-09-171-3/+3
| | | | Jeremy.
* r2371: Fix for talking to OS/2 clients (max_mux ignored) by Guenter Kukkukk ↵Jeremy Allison2004-09-171-1/+7
| | | | | | | <guenter.kukkukk@kukkukk.com>. Bugid #1590. Jeremy.
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+418
metze