summaryrefslogtreecommitdiffstats
path: root/source/auth/auth_util.c
Commit message (Collapse)AuthorAgeFilesLines
* r22390: Patchset sent to samba-technical to address the winbindGerald Carter2007-10-101-38/+10
| | | | | | | | | | | | | | | | | | | | loop when allocating a new id for a SID: auth_util.patch Revert create_local_token() to the 3.0.24 codebase idmap_type.patch Have the caller fillin the id_map.xid.type field when resolving a SID so that if we allocate a new id, we know what type to use winbindd_api.patch Remove the WINBINDD_SIDS_TO_XIDS calls from the public winbindd interface for the 3.0.25 release idmap_rid.patch Cleanup the idmap_rid backend to not call back into winbindd to resolve the SID in order to verify it's type.
* r22135: Check in most of Michael Adam's net conf utility. A good share of ↵Volker Lendecke2007-10-101-432/+0
| | | | | | | | | | | | this patch is moving functions around to fix some linker dependencies for the registry. Michael, I've renamed your auth_utils2.c to token_utils.c. Thanks! Volker
* r22022: - Clarify the commentsAndrew Bartlett2007-10-101-1/+1
| | | | | | | | - make sure never to free an uninitialised variable - ensure to free result on getpwnam_alloc failure Andrew Bartlett
* r22020: Make it more clear that both the vuser struct and it's contents areAndrew Bartlett2007-10-101-7/+11
| | | | | | | | | talloc_free()'ed at the end of a session. Rework the passwd cache code to use talloc_unlink and talloc_reference, to more carefully manage the cache. Andrew Bartlett
* r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher2007-10-101-2/+2
| | | | | | | | which matches what samba4 has. also fix all the callers to prevent compiler warnings metze
* r21999: remove useless castsStefan Metzmacher2007-10-101-6/+6
| | | | metze
* r21536: Fix copy/paste typo.Günther Deschner2007-10-101-1/+1
| | | | Guenther
* r20824: Send access to the trusted domain passwords through the pdb backend, ↵Volker Lendecke2007-10-101-2/+1
| | | | | | | | | | so that in the next step we can store them in LDAP to be replicated across DCs. Thanks to Michael Adam <ma@sernet.de> Volker
* r20774: I thought I committed this before Xmas holidays ...Simo Sorce2007-10-101-1/+1
| | | | | | | | | This change is needed to make it possible to not expire caches in disconnected mode. Jerry, please can you look at this and confirm it is ok? Simo.
* r20169: Support for fallback to legacy mapping code was not completely tested.Simo Sorce2007-10-101-10/+24
| | | | Add necessary fixes.
* r20116: Start merging in the work done to create the new idmap subsystem.Simo Sorce2007-10-101-7/+20
| | | | Simo.
* r20098: Properly fix issues with create_token_from_username()Jeremy Allison2007-10-101-6/+11
| | | | | | | | | | | | | | reported by James. Ensure that this function allocates everything on the temporary context except the return memory. Never call this with a null mem context, and now use conn->mem_ctx instead in smbd/service.c. Remove separate free functions for conn->ngroups and conn->nt_user_token as they are now always talloc'ed off the conn->mem_ctx. Future optimization will be to remove conn->mem_ctx and make all objects pointed to in the conn struct talloc'ed off conn itself. Easy to free then :-). Jeremy.
* r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison2007-10-101-40/+77
| | | | | | | | | | | | | 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.
* r19991: Sorry for this 2000-liner...Volker Lendecke2007-10-101-1/+1
| | | | | | | | | | | | | | The main thing here is a rewrite of srv_winreg_nt.c. The core functionality has moved to registry/reg_api.c which is then usable by the rest of Samba as well. On that way it fixes creating keys with more than one element in the path. This did not work before. Two things that sneaked in (sorry :-) is the change of some routines from NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal. Volker
* r19980: Implement pam account stack checks when obey pam restrictions is true.Simo Sorce2007-10-101-1/+1
| | | | | | It was missing for security=server/domain/ads Simo.
* r19773: TALLOC_FREE checks for NULL itselfVolker Lendecke2007-10-101-4/+1
|
* r19008: Fix a segfaultVolker Lendecke2007-10-101-0/+1
|
* r18271: Big change:Gerald Carter2007-10-101-2/+2
| | | | | | | | | | | * 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.
* r18029: More C++ stuffVolker Lendecke2007-10-101-2/+2
|
* r17924: Get rid of warnings now that talloc is merged.Volker Lendecke2007-10-101-4/+1
| | | | | | Destructors now take a pointer to the "real" destroyed object as an argument. Volker
* r17875: Fix (rather theoretical, but still...) null deref found byJeremy Allison2007-10-101-8/+11
| | | | | Stanford checker. Jeremy.
* r17736: Apply the Unix group patch when creating the token for aGerald Carter2007-10-101-1/+28
| | | | username map.
* r17710: Thanks to Thomas Bork for testing and continued feedback on this.Gerald Carter2007-10-101-2/+25
| | | | | | | | | | | Comments from the patch: /* Add the "Unix Group" SID for each gid to catch mapped groups and their Unix equivalent. This is to solve the backwards compatibility problem of 'valid users = +ntadmin' where ntadmin has been paired with "Domain Admins" in the group mapping table. Otherwise smb.conf would need to be changed to 'valid user = "Domain Admins"'. --jerry */
* r17402: Added lookup_name_smbconf() to be called when lookingJeremy Allison2007-10-101-2/+2
| | | | | | | | | up names from smb.conf. If the name is unqualified it causes the lookup to be done in WORKGROUP\name, then "Unix [users|groups]"\name rather than searching the domain. Should fix the problems with "force user" selecting a domain user by preference. Jeremy.
* r17399: Some C++ warningsVolker Lendecke2007-10-101-7/+8
|
* r17393: Remove Volker's ASSERT that num_groupsids > 0.Jeremy Allison2007-10-101-3/+5
| | | | | | | For guest connection they may well be zero. This should fix up the buildfarm (fingers crossed). Jeremy.
* r17392: Commit Volker's fix for the valid users problem.Jeremy Allison2007-10-101-30/+22
| | | | | Let's look at the build farm now... :-). Jeremy.
* r17391: Revert the second part of the valid users fix - theJeremy Allison2007-10-101-23/+5
| | | | | | | | | netlogon code uses pdb_get_group_sid() which could return a S-1-1-22 unix sid. Who knew.... :-(. I'm going to test Volker's fix instead. Once 3.0.23b is out we *have* to rip out the pdb_set_group_sid() code.... Jeremy.
* r17388: Fix the "valid users"/token issue for now. Volker,Jeremy Allison2007-10-101-5/+23
| | | | | | please come in and fix it in a less ugly way once you have some time. Thanks, Jeremy.
* r17378: Fix the issues people have been having with mappedJeremy Allison2007-10-101-2/+2
| | | | | | | | | | | | | | | users (username map) and failure to connect to a share. Essentially, even on a standalone system we were going into the create_token_from_username() code (I think by mistake) if the username was mapped. Fixes bug #3991. Volker & Jerry - please go over this with a very careful eye and let me know if this isn't correct (I think it is, but this isn't my code and it's a dangerous area for me to be playing in :-). Jeremy
* r17022: Fix the build farm -- maybe this is the real fix, testing moreVolker Lendecke2007-10-101-1/+2
|
* r17016: Different and smaller fix for the valid users = username problem.Volker Lendecke2007-10-101-1/+7
| | | | | | | | If no winbind is around, the best we can do to get the user's token correct is to ask unix via create_token_from_username. More investigation is needed if this also fixes the +groupname for unmapped groups problems more cleanly. Volker
* r17011: Back out r17010 after talking to Jerry. Another fix pending...Volker Lendecke2007-10-101-34/+9
| | | | Volker
* r17010: If winbind is not around, add S-1-22-1-<uid> to the user's token.Volker Lendecke2007-10-101-9/+34
| | | | | | See the comment in the patch for the reason. Volker
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-25/+79
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r16865: This is a proposal to fix bug 3915. Before sending patches around, ↵Volker Lendecke2007-10-101-6/+17
| | | | | | | | | | | this is what svn is for. The idea is that we fall back to a pure unix user with S-1-22 SIDs in the token in case anything weird is going on with the 'force user'. Volker
* r16864: Intermediate checkin -- swap the sid_check_is_in_unix_users andVolker Lendecke2007-10-101-38/+38
| | | | | | sid_check_is_in_our_domain cases. Volker
* r16766: A warning found by RHEL3. This might actually be 3.0.23 code, maybe ↵Volker Lendecke2007-10-101-1/+1
| | | | | | | | there are vasprintf implementations that don't like a NULL format. Volker
* r16749: BUG 3905: don't fail in create_local_nt_token() when aGerald Carter2007-10-101-3/+4
| | | | | checking for the builtin Administrators group membership. security = server has no domain info in secrets.tdb
* r16471: Bug reported by Vitaly Protsko <villy@sft.ru> in 3.0.23rc1.Gerald Carter2007-10-101-0/+25
| | | | | Add missing automatic add of the Administrators SID in the absence of winbindd and precense of Domain Admins SID in the user's token.
* r16241: Fix Klocwork #106 and others like it.Jeremy Allison2007-10-101-10/+30
| | | | | | | | | | | | | | Make 2 important changes. pdb_get_methods() returning NULL is a *fatal* error. Don't try and cope with it just call smb_panic. This removes a *lot* of pointless "if (!pdb)" handling code. Secondly, ensure that if samu_init() fails we *always* back out of a function. That way we are never in a situation where the pdb_XXX() functions need to start with a "if (sampass)" test - this was just bad design, not defensive programming. Jeremy.
* r16209: Klocwork bug #66, ensure no null deref.Jeremy Allison2007-10-101-1/+8
| | | | Jeremy.
* r16150: Fix possible NULL dereference found by Klocwork ID # 17Volker Lendecke2007-10-101-3/+2
|
* r16141: Dummy commit to make the build farm re-test against Samba4 16140Volker Lendecke2007-10-101-2/+1
|
* r15676: Fix meaningless debug statement from uninitialized variable.Jeremy Allison2007-10-101-3/+1
| | | | | Spotted by "John E. Malmberg" <wb8tyw@qsl.net>. Jeremy.
* r15600: Correctly fill in the gid for local users.Volker Lendecke2007-10-101-0/+6
| | | | Volker
* r15475: Ugly and disgusting patch to fix the username map problem I created byVolker Lendecke2007-10-101-13/+38
| | | | | | | | | | | changing the token generation. I *hate* this code! Jerry, you have been looking at this as well, can you double-check that I did not screw it up? Thanks, Volker
* r15472: Remove an unused function parameterVolker Lendecke2007-10-101-1/+0
|
* r15393: remove extra call to fallback user creation on member servers; it's ↵Gerald Carter2007-10-101-7/+2
| | | | handled by the smb_getpwnam() call deeper in
* r15086: Get defensive about creating user accounts when winbinddGerald Carter2007-10-101-2/+5
| | | | fails (but is present).