summaryrefslogtreecommitdiffstats
path: root/source/lib/sysacls.c
Commit message (Collapse)AuthorAgeFilesLines
* r21953: One format fix, clarify a condition that the IBMJeremy Allison2007-03-231-1/+1
| | | | | checker was worried about. Jeremy.
* r19784: smbd compiles (still a few warning which are actual bugs)Gerald Carter2006-11-191-16/+16
|
* r19749: Merge acl vfs changes, including nfs4 acl support, from SAMBA_3_0Jim McDonough2006-11-161-2751/+157
|
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-1/+0
|
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* r5789: Patch from William Jojo <jojowil@hvcc.edu> - AIX has no default ACLs.Jeremy Allison2005-03-141-0/+7
| | | | | Bug #2445. Jeremy.
* r4305: Fix from Albert Chin (china@thewrittenword.com) to fix theJeremy Allison2004-12-211-5/+5
| | | | | earlier malloc changes. Jeremy.
* r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).Jeremy Allison2004-12-201-31/+30
| | | | Jeremy
* r3693: Correctly detect errno for no acl/ea support.Jeremy Allison2004-11-121-0/+20
| | | | Jeremy
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+3198
metze