summaryrefslogtreecommitdiff
path: root/source/smbd/password.c
Commit message (Collapse)AuthorAgeFilesLines
* Ensure invalidate_vuid() deletes any ntlmssp state.Jeremy Allison2008-02-141-0/+4
| | | | Jeremy.
* str_list_free is not needed anymoreVolker Lendecke2008-02-041-4/+2
|
* Always pass a TALLOC_CTX to str_list_make and str_list_copyVolker Lendecke2008-02-041-4/+5
|
* strtok -> strtok_rVolker Lendecke2008-01-231-4/+8
|
* Remove Get_Pwnam and its associated static variableVolker Lendecke2007-12-191-1/+4
| | | | All callers are replaced by Get_Pwnam_alloc
* Simplify add_session_userVolker Lendecke2007-12-101-33/+25
|
* Remove PSTRING_LEN from smbd/ nmbd/.Jeremy Allison2007-11-291-3/+3
| | | | | | | Remove pstring from libsmb/clidfs.c except for a nasty hack (that will be removed when pstrings are gone from client/). Jeremy.
* Fix an implicit cast warning.Michael Adam2007-11-161-1/+1
| | | | Michael
* Remove last pstring from smbd/*.cJeremy Allison2007-11-131-25/+45
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-8/+8
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r24590: Reformatting to coding standards. Added my (C) in places it already ↵Jeremy Allison2007-10-101-19/+22
| | | | | | | should have been :-). Jeremy.
* r24589: Refactor our vuid code so that we keep the sameJeremy Allison2007-10-101-132/+165
| | | | | | | | | | | vuid that was allocated whilst the connection is being constructed and after the connection has been set up. This is what Windows does and at least one client (and HP printer) depends on this behaviour. As it depends on the req struct not yet ported to SAMBA_3_2_0 (Volker, hint hint.... :-) I am not yet adding this to that branch, but will investigate that tomorrow. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach2007-10-101-1/+1
| | | | failed expression in SMB_ASSERT.
* r22542: Move over to using the _strict varients of the tallocJeremy Allison2007-10-101-1/+1
| | | | | calls. No functional changes. Looks bigger than it is :-). Jeremy.
* r22020: Make it more clear that both the vuser struct and it's contents areAndrew Bartlett2007-10-101-39/+25
| | | | | | | | | 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
* r21460: Fix for server-side processing of SPNEGO authJeremy Allison2007-10-101-0/+1
| | | | | | | fragmented into "max xmit" size security blob chunks. Bug #4400. Needs limits adding, and also a client-side version. Jeremy.
* r21128: Fix Vista connecting to Samba in share level security.Jeremy Allison2007-10-101-0/+25
| | | | | | | | Vista sends the NTLMv2 blob by default in the tconX packet. Make sure we save off the workgroup the user was logged into on the client in the sessionsetupX and re-use it for the NTLMv2 calc. Jeremy.
* r17408: Let us use netgroups even without a NIS domain but just using filesSimo Sorce2007-10-101-4/+3
|
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-9/+10
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r15589: While trying to understand the vuid code I found that security=share ↵Volker Lendecke2007-10-101-3/+2
| | | | | | | | | | | | | | | | | | | | is broken right now. r14112 broke it, in 3.0.22 register_vuid for security=share returns UID_FIELD_INVALID which in current 3_0 is turned into an error condition. This makes sure that we only call register_vuid if sec!=share and meanwhile also fixes a little memleak. Then I also found a crash in smbclient with sec=share and hostmsdfs=yes. There's another crash with sec=share when coming from w2k3, but I need sleep now. Someone (jerry,jra?) please review the sesssetup.c change. Thanks, Volker
* r15583: Add a comment while trying to understand this codeVolker Lendecke2007-10-101-0/+5
|
* r14112: * fix checks on return code from register_vuid() which could actuallyGerald Carter2007-10-101-1/+1
| | | | | | | fail and we would still return success in the SMBsesssetup reply :-( * Make sure to create the local token for the server_fino struct in reply_spnego_kerberos() so that register_vuid() does not fail. (how did this ever work?)
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Carter2007-10-101-5/+5
| | | | macro which sets the freed pointer to NULL.
* r13494: Merge the stuff I've done in head the last days.Volker Lendecke2007-10-101-0/+129
| | | | Volker
* r13316: Let the carnage begin....Gerald Carter2007-10-101-54/+89
| | | | Sync with trunk as off r13315
* r12311: ReformattingVolker Lendecke2007-10-101-15/+23
|
* r12305: ReformattingVolker Lendecke2007-10-101-8/+20
|
* r8472: abartlet's patch for parallel ntlmssp ↵Gerald Carter2007-10-101-1/+36
| | | | supporttrunk/source/smbd/sesssetup.c
* r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison2007-10-101-2/+2
| | | | | | safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-4/+4
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.Tim Potter2007-10-101-1/+1
| | | | Bugzilla #1903.
* r2082: lp_path should be lp_pathname.Jeremy Allison2007-10-101-1/+1
| | | | | Paranoia fix on mangle prefix. Jeremy.
* r2077: fix logic bug in the check for creating a user's home directory in ↵Gerald Carter2007-10-101-10/+13
| | | | register_vuid(); add a few extra debug lines
* r1506: Fix inspired by patches from Michael Collin Nielsen ↵Jeremy Allison2007-10-101-11/+15
| | | | | | | <michael@hum.aau.dk> - ensure home directory service number is correctly reused. Jeremy.
* r519: fix bug in authorise_login() that broke security = shareGerald Carter2007-10-101-0/+2
|
* r486: BUG 1309: fix seg fault caused by trying to strdup() a NULL pointerGerald Carter2007-10-101-1/+5
|
* r225: Patch from Pat.Hayward@propero.net to make the session_users list dynamic.Jeremy Allison2007-10-101-8/+28
| | | | | I restricted it to 128k max to prevent DOS attacks. Jeremy.
* Merge from HEAD the SMB signing patch that I developed a couple of weeksAndrew Bartlett2004-03-271-1/+1
| | | | | | | | | | | | | ago. This patch re-adds support for 'optional' SMB signing. It also ensures that we are much more careful about when we enable signing, particularly with on-the-fly smb.conf reloads. The client code will now attempt to use smb signing by default, and disable it if the server doesn't correctly support it. Andrew Bartlett
* BUG 417: fix %UuGg variables expansion in include lines setging the ↵Gerald Carter2004-03-191-0/+4
| | | | current_user_info struct in register_vuid() -- shouldn't be any more broken than we were
* cleanup patch for bug 977 so we don't display incorrect debug messagesGerald Carter2004-01-311-8/+12
|
* bug 977 - don't create a homes share for a user if a static share already ↵Gerald Carter2004-01-271-1/+7
| | | | exists by the same name
* Changes all over the shop, but all towards:Andrew Bartlett2003-11-221-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - NTLM2 support in the server - KEY_EXCH support in the server - variable length session keys. In detail: - NTLM2 is an extension of NTLMv1, that is compatible with existing domain controllers (unlike NTLMv2, which requires a DC upgrade). * This is known as 'NTLMv2 session security' * (This is not yet implemented on the RPC pipes however, so there may well still be issues for PDC setups, particuarly around password changes. We do not fully understand the sign/seal implications of NTLM2 on RPC pipes.) This requires modifications to our authentication subsystem, as we must handle the 'challege' input into the challenge-response algorithm being changed. This also needs to be turned off for 'security=server', which does not support this. - KEY_EXCH is another 'security' mechanism, whereby the session key actually used by the server is sent by the client, rather than being the shared-secret directly or indirectly. - As both these methods change the session key, the auth subsystem needed to be changed, to 'override' session keys provided by the backend. - There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure. This should help the SPNEGO implementation. - The 'names blob' in NTLMSSP is always in unicode - never in ascii. Don't make an ascii version ever. - The other big change is to allow variable length session keys. We have always assumed that session keys are 16 bytes long - and padded to this length if shorter. However, Kerberos session keys are 8 bytes long, when the krb5 login uses DES. * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. * - Add better DEBUG() messages to ntlm_auth, warning administrators of misconfigurations that prevent access to the privileged pipe. This should help reduce some of the 'it just doesn't work' issues. - Fix data_blob_talloc() to behave the same way data_blob() does when passed a NULL data pointer. (just allocate) REMEMBER to make clean after this commit - I have changed plenty of data structures...
* Fix for valid users = %S in homes share.Jeremy Allison2003-09-261-3/+7
| | | | Jeremy.
* fix bug 397: use a variant of alloc_sub_basic() for string lists.Gerald Carter2003-09-051-1/+4
|
* Signing so far... the client code fails on a SMBtrans2 secondary transactionJeremy Allison2003-07-181-5/+3
| | | | | | | I think (my changes haven't affected this I believe). Initial support on the server side for smbclient. Still doesn't work for w2k clients I think... Work in progress..... (don't change). Jeremy.
* Formatting tidyups to match the rest of the source.Jeremy Allison2003-07-171-23/+33
| | | | Jeremy.
* Missed this in the previous patch - we now have a seperate idea of theAndrew Bartlett2003-07-031-1/+1
| | | | | | 'unix username' from the NT username, in the auth subsystem at least. Andrew Bartlett