summaryrefslogtreecommitdiff
path: root/source3/auth
AgeCommit message (Collapse)AuthorFilesLines
2009-05-12s3 auth: Make debug message louder and more usefulDan Sledz1-2/+3
2009-05-11Fix a bunch of compiler warnings about wrong format types.Jeremy Allison1-5/+5
Should make Solaris 10 builds look cleaner. Jeremy.
2009-05-07s3-auth: use full 16byte session key in make_user_info_netlogon_interactive().Günther Deschner1-2/+1
Patch from Jeremy. With this patch, I was able to join Windows 7 RC to a Samba3 DC, and login into a Samba 3 Domain. There are still two registry settings required: HKLM\System\CCS\Services\LanmanWorkstation\Parameters DWORD DomainCompatibilityMode = 1 DWORD DNSNameResolutionRequired = 0 Do *not* modify the other netlogon registry parameters that were passed around, they weaken security. Guenther (cherry picked from commit b5097d54cb74ca0ea328f9e029562f65f4a01134)
2009-04-28Fix bug #6291 - force user stop working.Jeremy Allison1-1/+37
A previous fix broke the invariant that *uid is always initialized on return from create_token_from_username(). Restore it. Jeremy.
2009-04-19s3:auth Fix segfault: Always initialise returned session keysAndrew Bartlett1-1/+3
2009-04-14Make Samba3 use the new common libcli/auth codeAndrew Bartlett2-12/+44
This is particuarly in the netlogon client (but not server at this stage)
2009-04-14Rework Samba3 to use new libcli/auth code (partial)Andrew Bartlett4-2/+6
This commit is mostly to cope with the removal of SamOemHash (replaced by arcfour_crypt()) and other collisions (such as changed function arguments compared to Samba3). We still provide creds_hash3 until Samba3 uses the credentials code in netlogon server Andrew Bartlett
2009-04-01s3-auth: rename static smb_create_user(). Sorry...Günther Deschner1-2/+2
Guenther
2009-02-26s3: fix guest auth when winbindd is runningSteven Danneman1-7/+7
This fix is very subtle. If a server is configured with "security = share" and "guest ok = yes" and winbindd is running authorization will fail during tree connect. This is due to our inability to map the guest sid S-1-5-21-X-501 to a uid through sid_to_uid(). Winbindd is unaware of the hard coded mapping between this sid and whatever uid the name in lp_guestaccount() is assigned. So sid_to_uid() fails and we exit create_token_from_username() without ever calling pdb_getsampwsid() which IS aware of the hard coded mapping. This patch just reorganizes the code, moving sid_to_uid() down to the block of code in which it is needed, avoiding this early failure.
2009-02-25s3: Fix 'assignment differ in signedness' warningTim Prouty1-1/+1
2009-02-24s3: Rename auth_onefs_wb and pdb_onefs_samDan Sledz1-7/+23
auth_onefs_wb.c -> auth_wbc.c pdb_onefs_sam.c -> pdb_wbc_sam.c No changes to functionality
2009-02-21Revert "s3 auth: Add parameter that forces every user through an NSS lookup"Tim Prouty1-22/+4
After the discussion on samba-technical, it was decided that the best answer for now was to revert this change. The right way to do this is to rewrite the token api to use opaque tokens with pluggable modules. This reverts commit 8e19a288052bca5efdb0277a40c1e0fdd099cc2b.
2009-02-21Fix the build on SolarisVolker Lendecke1-1/+1
2009-02-21Fix some nonempty blank linesVolker Lendecke1-31/+31
2009-02-21Remove the static "chal" from ntlmssp.c:get_challenge()Volker Lendecke3-10/+15
2009-02-20Introduce a new authentication backend auth_onefs_wbDan Sledz1-0/+134
This new backend is custom tailored to onefs' unique requirements: 1) No fallback logic 2) Does not validate the domain of the user 3) Handles unencrypted passwords
2009-02-16s3 auth: Add parameter that forces every user through an NSS lookupZach Loafman1-4/+22
When set to yes, "force username map" forces every user, even AD users, through an NSS lookup. This allows the token to be overridden with information from NSS in certain broken environments.
2009-02-13s3:auth: only create_local_token() should add S-1-22-X-Y sidsStefan Metzmacher1-27/+0
metze
2009-02-13s3:auth: add S-1-22-X-Y sids to the local tokenStefan Metzmacher1-0/+38
metze
2009-02-12s3: Added new parameter "map untrusted to domain"Steven Danneman1-4/+8
When enabled this reverts smbd to the legacy domain remapping behavior when a user provides an untrusted domain This partially reverts d8c54fdd
2009-02-11s3: Change behavior when seeing an unknown domain.Dan Sledz1-22/+35
After a lot of testing against various Windows servers (W2K, W2K3, W2K8), within an AD domain it seems that unknown domains will only be translated to the local account domain, not the netbios name of the member server's domain. This makes samba act more like Windows.
2009-02-11Fix double free caused by incorrect talloc_steal usage.Dan Sledz1-2/+2
2009-02-10S3: Fixes for coverity issues.todd stecher1-2/+2
2009-02-10Fix some nonempty blank linesVolker Lendecke1-9/+9
2009-02-04Fix a valgrind error: rpc_bind talloc_move()s the auth structVolker Lendecke1-2/+0
2009-02-04Ensure null termination of the password in mymachinepw, remove a debugVolker Lendecke1-3/+1
2009-01-21Memory leaks and other fixes found by Coveritytodd stecher1-1/+3
2009-01-21Fix a typoVolker Lendecke1-1/+1
2009-01-20Fix some nonempty blank linesVolker Lendecke1-9/+9
2008-12-19Make cli_negprot return NTSTATUS instead of boolVolker Lendecke1-3/+6
2008-12-04Fix bug #1254 - write list not working under share-level securityJeremy Allison1-1/+1
A somewhat more elegant fix than I could use for 3.2.x or 3.0.x. Turns out the only part of check_user_ok() that needs to change for share level security is the VUID cache pieces, so I can just always use check_user_ok() for all lp_security() cases. Jeremy
2008-11-14Make memcache_add_talloc NULL out the source pointerVolker Lendecke1-2/+4
This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
2008-11-06Make us clean under valgrind --leak-check=full by using ↵Jeremy Allison1-1/+1
talloc_autofree_context() instead of NULL. Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should be deleted when their parent context is deleted, so freeing them at some arbitrary point later will be a double-free. Jeremy.
2008-11-06Add wrapper str_list_make_v3() to replace the old S3 behavior ofJeremy Allison1-8/+8
str_list_make(). From Dan Sledz <dan.sledz@isilon.com>: In samba 3.2 passing NULL or an empty string returned NULL. In master, it now returns a list of length 1 with the first string set to NULL (an empty list). Jeremy.
2008-10-23Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij1-1/+1
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
2008-10-13Add data_blob_string_const_null() function that includes the terminatingJelmer Vernooij1-2/+2
null byte and use it in Samba 3. This matches the behaviour prior to my data_blob changes.
2008-10-12Use common strlist implementation in Samba 3 and Samba 4.Jelmer Vernooij1-2/+2
2008-10-11Cope with changed signature of http_timestring().Jelmer Vernooij1-1/+1
2008-10-06Add netlogond auth methodVolker Lendecke1-0/+321
This authenticates against a local running samba4 using SamLogonEx. We retrieve the machine password using samba4's mymachinepwd script and store the schannel key for re-use in secrets.tdb.
2008-10-03Simply our main loop processing. A lot :-). Correctly use events for all the ↵Jeremy Allison1-0/+65
previous "special" cases. A step on the way to adding signals to the events and being able to merge the S3 event system with the S4 one. Jeremy.
2008-09-03Revert "Split lookup_name() and create a new functiong called"Simo Sorce2-7/+17
This reverts commit 8594edf666c29fd4ddf1780da842683dd81483b6. (This used to be commit ad462e2e2d025a7fc23e7dea32b2b442b528970b)
2008-08-26Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-develSimo Sorce1-2/+3
(This used to be commit e038f1cf9fb305fc1e7a4189208e451d30aaa1f0)
2008-08-25auth: Fix build warning.Günther Deschner1-2/+3
Guenther (This used to be commit 4661ef625a6522d6f859b83e3e3702f01d0b952f)
2008-08-17Split lookup_name() and create a new functiong calledSimo Sorce2-17/+7
lookup_domain_name(). This new function accept separated strings for domain and name. (This used to be commit 8594edf666c29fd4ddf1780da842683dd81483b6)
2008-08-14Fix show-stopper for 3.2. Smbd depends on group SIDJeremy Allison1-0/+34
position zero being the primary group sid. Authenicating via winbindd call returned a non-sorted sid list. This fixes is for both a winbindd call and a pac list from an info3 struct. Without this we mess up the primary group associated with created files. Found by Herb. Jeremy. (This used to be commit cb925dec85cfc4cfc194c3ff76dbeba2bd2178d7)
2008-08-14Make it clear that this is a temporary context byusing a talloc stackframe ↵Jeremy Allison1-22/+16
instead. Jeremy (This used to be commit 7f7dd5e8883e23d7fe3f9cb804905c5b23a5a41c)
2008-07-30Removed redundant logging from create_builtin_users and ↵Tim Prouty1-16/+4
create_builtin_administrators The Debug messages in create_builtin_users and create_builtin_users have now been encapsulated in add_sid_to_builtin. (This used to be commit ca153139b1dced07c196aac93dbc9d9428d98124)
2008-07-30Enabled domain groups to be added to builtin groups at domain join timeTim Prouty1-2/+2
Previously this was done at token creation time if the Administrators and Users builtins hadn't been created yet. A major drawback to this approach is that if a customer is joined to a domain and decides they want to join a different domain, the domain groups from this new domain will not be added to the builtins. It would be ideal if these groups could be added exclusively at domain join time, but we can't rely solely on that because there are cases where winbindd must be running to allocate new gids for the builtins. In the future if there is a way to allocate gids for builtins without running winbindd, this code can be removed from create_local_nt_token. - Made create_builtin_users and create_builtin_administrators non-static so they can be called from libnet - Added a new function to libnet_join that will make a best effort to add domain administrators and domain users to BUILTIN\Administrators and BUILTIN\Users, respectively. If the builtins don't exist yet, winbindd must be running to allocate new gids, but if the builtins already exist, the domain groups will be added even if winbindd is not running. In the case of a failure the error will be logged, but the join will not be failed. - Plumbed libnet_join_add_dom_rids_to_builtins into the join post processing. (This used to be commit e92faf5996cadac480deb60a4f6232eea90b00f6)
2008-07-30Refactored the code that adds Domain Admins to BUILTIN\Administrators to use ↵Tim Prouty1-26/+30
the new helper functions. - Modified create_builtin_administrators and add_builtin_administrators to take in the domain sid to reduce the number of times it needs to be looked up. - Changed create_builtin_administrators to call the new helper functions. - Changed create_local_nt_token to call the new version of create_builtin_administrators and handle the new error that can be returned. - Made it more explicit that add_builtin_administrators is only called when winbindd can't be pinged. (This used to be commit f6411ccb4a1530034e481e1c63b6114a93317b29)
2008-07-30Refactored the code that adds Domain Users to BUILTIN\Users to use the new ↵Tim Prouty1-17/+22
helper functions. - Modified create_builtin_users to take in the domain sid to reduce the number of times it needs to be looked up. - Changed create_builtin_users to call the new helper functions. - Changed create_local_nt_token to call the new version of create_builtin_users and handle the new error that can be returned. (This used to be commit 8d75d40b9f6d22bae7430211f8a1fe99051b756c)