summaryrefslogtreecommitdiffstats
path: root/source/lib/system_smbd.c
Commit message (Collapse)AuthorAgeFilesLines
* r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison2006-12-091-4/+11
| | | | | | | | | | | | | we never mix malloc and talloc'ed contexts in the add_XX_to_array() and add_XX_to_array_unique() calls. Ensure that these calls always return False on out of memory, True otherwise and always check them. Ensure that the relevent parts of the conn struct and the nt_user_tokens are TALLOC_DESTROYED not SAFE_FREE'd. James - this should fix your crash bug in both branches. Jeremy.
* r19419: BUG 4109: Patch from Timur Bakeyev. Fix bug causing smbd to turn off Gerald Carter2006-10-191-10/+5
| | | | winbindd and fail to disable the _NO_WINBIND environment.
* r14868: I will not write code when changing to Daylight Savings Time.Gerald Carter2006-04-021-10/+6
| | | | | | | | | | | | | | | | I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. ... Fix my brain dead inverted logic for turning winbindd on and off when run on a DC or when calling pdb functions from within winbindd.
* r14855: Various fixes:Gerald Carter2006-04-021-2/+8
| | | | | | | | * depreacte 'acl group control' after discussion with Jeremy and implement functionality as part of 'dos filemode' * fix winbindd on a non-member server to expand local groups * prevent code previously only used by smbd from blindly turning _NO_WINBINDD back on
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-7/+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.
* r13494: Merge the stuff I've done in head the last days.Volker Lendecke2006-02-131-67/+10
| | | | Volker
* r13460: by popular demand....Gerald Carter2006-02-111-3/+24
| | | | | | | | | * remove pdb_context data structure * set default group for DOMAIN_RID_GUEST user as RID 513 (just like Windows) * Allow RID 513 to resolve to always resolve to a name * Remove auto mapping of guest account primary group given the previous 2 changes
* r13316: Let the carnage begin....Gerald Carter2006-02-031-66/+25
| | | | Sync with trunk as off r13315
* r12291: Make getgroups_user static.Volker Lendecke2005-12-161-2/+2
| | | | | | | Jeremy, there's a #ifdef'ed 0 call to this in your usershare code. We need to talk about what exactly what you intend to do here and in what scenarios. Volker
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2005-10-181-27/+78
| | | | | x86_64 box. Jeremy.
* r6080: Port some of the non-critical changes from HEAD to 3_0. The main one ↵Volker Lendecke2005-03-271-2/+2
| | | | | | | | is the change in pdb_enum_alias_memberships to match samr.idl a bit closer. Volker
* r5127: Fix Bug 2289 -- thanks to jason@ncac.gwu.eduVolker Lendecke2005-01-311-2/+1
|
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-4/+4
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r3705: Nobody has commented, so I'll take this as an ack...Volker Lendecke2004-11-121-1/+89
| | | | | | | | | | | | | | | | | abartlet, I'd like to ask you to take a severe look at this! We have solved the problem to find the global groups a user is in twice: Once in auth_util.c and another time for the corresponding samr call. The attached patch unifies these and sends them through the passdb backend (new function pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further optimize the corresponding call if the samba and posix accounts are unified by issuing a specialized ldap query. The parameter to activate this ldapsam behaviour is ldapsam:trusted = yes Volker
* r470: BUG 1302: fix seg fault by not trying to optimize a list of invalid ↵Gerald Carter2004-05-041-5/+4
| | | | gids using the wrong array size
* r288: combination of BUG 1081 and patch from J. Klinger -- added ↵Gerald Carter2004-04-201-0/+5
| | | | remove_duplicate_gids() to smbd and winbindd
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+137
metze