summaryrefslogtreecommitdiffstats
path: root/source/groupdb
Commit message (Collapse)AuthorAgeFilesLines
* r25403: grab latest changes form 3.2 tree in preparation for release of ↵Gerald Carter2007-09-281-2/+0
| | | | 3.2.0pre1
* r25387: Sync with 3.2.0 svn treeGerald Carter2007-09-271-14/+2
|
* r25024: Fix a whole bunch of Coverity bugsVolker Lendecke2007-09-081-0/+1
| | | | | | The callers of get_domain_group_from_sid() with some justification expected map->gid to be initialized when get_domain_group_from_sid returned True.
* r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell2007-07-103-6/+3
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-093-3/+3
| | | | Jeremy.
* r23511: Merge branches/SAMBA_3_0@23510James Peach2007-06-151-1/+1
| | | | | Tidy calls to smb_panic by removing trailing newlines. Print the failed expression in SMB_ASSERT.
* r23367: check the "use mmap" option for ldb tooAndrew Tridgell2007-06-061-0/+4
|
* r23322: - added ldb back into the buildAndrew Tridgell2007-06-044-81/+825
| | | | | | | | - added back the ldb groupdb backend - enable switching between the tdb and ldb backends using "groupdb:backend". This is a safety net only, it should go away in future versions
* r22945: merge 22009 from SAMBA_3_0 + some warning fixes for new code:Stefan Metzmacher2007-05-161-12/+12
| | | | | | | | change TDB_DATA from char * to unsigned char * and fix all compiler warnings in the users metze
* r22936: merge 21973:21989 from SAMBA_3_0Stefan Metzmacher2007-05-161-36/+17
| | | | | | (use helper functions to create TDB_DATA elements) metze
* r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "netVolker Lendecke2007-05-111-64/+0
| | | | sam unmapunixgroup"
* r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and changeVolker Lendecke2007-05-111-16/+0
| | | | | | return values of some alias-releated pdb functions from BOOL to NTSTATUS Thanks :-)
* r22554: Fix an assumption that TALLOC_ARRAY(.., 0) != NULL.Volker Lendecke2007-04-281-2/+7
| | | | Volker
* r22509: Fix some memory corruption caused by calling free()Gerald Carter2007-04-251-6/+6
| | | | | on talloc()'d memory when adding/removing members from Local Groups.
* r21452: Revert to tdb group_mapping implementation for 3.0.25 release.Gerald Carter2007-02-191-686/+0
| | | | No other changes here.
* r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison2006-12-093-9/+9
| | | | | | | | | | | | | 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.
* r19927: Fix klokwork ID 4702Volker Lendecke2006-11-281-1/+4
|
* r19795: * bring the 'enum lsa_SidType', 'struct GUID', & 'structGerald Carter2006-11-194-657/+10
| | | | policy_handle' over from SAMBA_3_0.
* r19787: get winbindd compilingGerald Carter2006-11-191-1/+1
|
* r19782: more compile fixes for mergeGerald Carter2006-11-191-2/+2
|
* r19771: more compile fixes....have to tackle the DLIST_XXX macros nextGerald Carter2006-11-181-1/+1
|
* r19767: Intermediate checking (does not yet compile)Gerald Carter2006-11-183-0/+1399
|\ | | | | | | | | | | | | | | | | * bring over lib/{ldb,replace,talloc,socket_wrapper} * bring over libaddns, tdb * remove smbwrappper * grab Makefile and configure.in from SAMBA_3_0 * Start dealing with snum -> share struct issues * Start merging filename mangling code
| * r19516: Fix the DN, to make searches using the domain as baseSimo Sorce2006-10-311-9/+9
| | | | | | | | | | | | | | the DN must be rid,domain and not domain,rid Also use member and not memberOf for group members following conventions.
| * r19073: mapping_dn can failVolker Lendecke2006-10-041-2/+15
| |
| * r18938: fixed a group map bug reported by Jerry. The caller in mapping.cAndrew Tridgell2006-09-271-4/+1
| | | | | | | | | | relies on appending to this list. Unfortunately this can't be tested using 'net groupmap'
| * r18912: we don't need the special case for comments now in theAndrew Tridgell2006-09-261-5/+1
| | | | | | | | | | This also fixes comments in group mappings, as the code accidentially put in "ntName" in the comment field :-)
| * r18875: The comment field can be emptyVolker Lendecke2006-09-241-2/+6
| |
| * r18870: - enable the ldb ldap backend properly based on configure tests forAndrew Tridgell2006-09-241-2/+2
| | | | | | | | | | | | | | ldap - use ldb_global_init() instead of the backend specific ldb_tdb_init().
| * r18868: just in case there is a disaster (with our code? never ...) use aAndrew Tridgell2006-09-241-2/+7
| | | | | | | | | | | | | | | | | | | | rename to group_mapping.tdb.upgraded rather than an unlink when upgrading. So if we absolutely have to go back to the tdb, we can change mapping_ldb.o to mapping_tdb.o in Makefile.in and recover peoples group mappings. We could go one step futher and make the backend configurable. Any opinions on that?
| * r18867: change the group mapping code to use ldb instead of tdbAndrew Tridgell2006-09-244-648/+1385
| | | | | | | | See the discussion of this on the samba-technical list
| * r18703: Fix the annoying effect that happens when nscd is running:Günther Deschner2006-09-201-1/+16
| | | | | | | | | | | | | | | | | | We usually do not get the results from user/group script modifications immediately. A lot of users do add nscd restart/refresh commands into their scripts to workaround that while we could flush the nscd caches directly using libnscd. Guenther
| * r18271: Big change:Gerald Carter2006-09-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | * autogenerate lsa ndr code * rename 'enum SID_NAME_USE' to 'enum lsa_SidType' * merge a log more security descriptor functions from gen_ndr/ndr_security.c in SAMBA_4_0 The most embarassing thing is the "#define strlen_m strlen" We need a real implementation in SAMBA_3_0 which I'll work on after this code is in.
| * r17669: Remove RID algorithm support from unmapped users and groupsGerald Carter2006-08-211-1/+1
| | | | | | | | when using smbpasswd
| * r17554: CleanupVolker Lendecke2006-08-151-531/+450
| |
| * r17550: Fix a few bugs in the tdb_multikey code. Thanks to tridge for ↵Volker Lendecke2006-08-151-4/+4
| | | | | | | | | | | | | | | | pointing them out. Volker
| * r17470: This is the group mapping rewrite announced a few days ago. I'm ↵Volker Lendecke2006-08-091-293/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | afraid it's more than 1000 lines of patch, but doing it in smaller pieces is hardly possible. Anybody interested please look over this. The patch is not really interesting, just look at the new groupdb/mapping.c file. Jerry, one entry for the 3.0.24 release notes: smbd will refuse to start if we have overlapping mappings in group_mapping.tdb. With the old db a unix gid can be mapped to two different SIDs. This will be refused with the new code. Volker
| * r17468: To minimize the diff later on, pre-commit some changes ↵Volker Lendecke2006-08-091-113/+103
| | | | | | | | | | | | | | | | independently: Change internal mapping.c functions to return NTSTATUS instead of BOOL. Volker
| * r17465: Get rid of add_initial_entry. In the two places it was called in it ↵Volker Lendecke2006-08-081-25/+0
| | | | | | | | | | | | | | | | seemed a bit pointless to me. Volker
| * r17463: A bit of cleanup work: Volker Lendecke2006-08-081-68/+4
| | | | | | | | | | | | | | | | | | | | | | | | Remove some unused code: pdb_find_alias is not used anymore, and nobody I think has ever used the pdb_nop operations for group mapping. smbpasswd and tdb use the default ones and ldap has its own. Make the functions pdb_getgr* return NTSTATUS instead of BOOL. Nobody right now really makes use of it, but it feels wrong to throw away information so early. Volker
| * r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as anVolker Lendecke2006-08-081-13/+13
| | | | | | | | | | | | argument. Volker
* | r18703: Fix the annoying effect that happens when nscd is running:Günther Deschner2006-09-201-1/+16
| | | | | | | | | | | | | | | | | | We usually do not get the results from user/group script modifications immediately. A lot of users do add nscd restart/refresh commands into their scripts to workaround that while we could flush the nscd caches directly using libnscd. Guenther
* | r17669: Remove RID algorithm support from unmapped users and groupsGerald Carter2006-08-211-1/+1
|/ | | | when using smbpasswd
* r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring ↵Volker Lendecke2006-04-171-1/+1
| | | | | | | | | does not have the timeout argument in Samba4. Add a new routine tdb_lock_bystring_with_timeout. Volker
* r14634: Many bug fixes thanks to train rides and overnight stays in airportsGerald Carter2006-03-221-0/+1
| | | | | | | | | | | | | | | | | | * Finally fix parsing idmap uid/gid ranges not to break with spaces surrounding the '-' * Allow local groups to renamed by adding info level 2 to _samr_set_aliasinfo() * Fix parsing bug in _samr_del_dom_alias() reply * Prevent root from being deleted via Samba * Prevent builting groups from being renamed or deleted * Fix bug in pdb_tdb that broke renaming user accounts * Make sure winbindd is running when trying to create the Administrators and Users BUILTIN groups automatically from smbd (and not just check the winbind nexted groups parameter value). * Have the top level rid allocator verify that the RID it is about to grant is not already assigned in our own SAM (retries up to 250 times). This fixes passdb with existing SIDs assigned to users from the RID algorithm but not monotonically allocating the RIDs from passdb.
* r14457: Add a few more special cases for RID 513 in the samr code.Gerald Carter2006-03-151-1/+17
| | | | | | Now that I know what all the requirements for this group are I can generalize the code some more and make it cleaner. But at least this is working with lusrmgr.msc on XP and 2k now.
* r14403: * modifies create_local_nt_token() to create a BUILTIN\AdministratorsGerald Carter2006-03-151-52/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | group IFF sid_to_gid(S-1-5-32-544) fails and 'winbind nested groups = yes' * Add a SID domain to the group mapping enumeration passdb call to fix the checks for local and builtin groups. The SID can be NULL if you want the old semantics for internal maintenance. I only updated the tdb group mapping code. * remove any group mapping from the tdb that have a gid of -1 for better consistency with pdb_ldap.c. The fixes the problem with calling add_group_map() in the tdb code for unmapped groups which might have had a record present. * Ensure that we distinguish between groups in the BUILTIN and local machine domains via getgrnam() Other wise BUILTIN\Administrators & SERVER\Administrators would resolve to the same gid. * Doesn't strip the global_sam_name() from groups in the local machine's domain (this is required to work with 'winbind default domain' code) Still todo. * Fix fallback Administrators membership for root and domain Admins if nested groups = no or winbindd is not running * issues with "su - user -c 'groups'" command * There are a few outstanding issues with BUILTIN\Users that Windows apparently tends to assume. I worked around this presently with a manual group mapping but I do not think this is a good solution. So I'll probably add some similar as I did for Administrators.
* r13955: Fix Coverity ID 139.Volker Lendecke2006-03-071-1/+1
| | | | | | | Not a bug in the strictest sense, more a clarification. This whole routine assumes new_gid != NULL anyway, so there's no point in checking. Volker
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-1/+1
| | | | macro which sets the freed pointer to NULL.
* r13494: Merge the stuff I've done in head the last days.Volker Lendecke2006-02-131-9/+8
| | | | Volker