summaryrefslogtreecommitdiff
path: root/source3/smbd/sesssetup.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-04Commit the translation of the realm to the netbios domain name in the kerberosVolker Lendecke1-3/+41
session setup. After talking to jht and abartlet I made this unconditional, no additional parameter. Jerry: This is a change in behaviour, but I think it is necessary. Volker (This used to be commit d32f47fedcff3fdf46f42926d1cd84433e7ab487)
2003-12-12Fix for bug #815. Make plaintext unicode passwords work with NT4.xJeremy Allison1-5/+11
Jeremy. (This used to be commit 29bac18b6971f459c3cb138366ae493d5805f643)
2003-12-05fix %a variable for Windows 2003 -> Win2K3Gerald Carter1-9/+39
(This used to be commit d7db1439a626ae13b77dc262c82e713fcab1ab4f)
2003-12-01Subtract NT_STATUS from common flag, don't add it...Jeremy Allison1-4/+4
Jeremy. (This used to be commit 0ed153af55279ba1e621c688b5e78f842e72ea1e)
2003-12-01Don't automatically set nt status code flag unless client tells us it canJeremy Allison1-9/+19
cope. Jeremy. (This used to be commit dd1ac8d5eba060dcd7fdde7449d07bee1dc12b27)
2003-11-22(merge from 3.0)Andrew Bartlett1-11/+21
Changes all over the shop, but all towards: - 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... Andrew Bartlett (This used to be commit 57a895aaabacc0c9147344d097d333793b77c947)
2003-10-22Put strcasecmp/strncasecmp on the banned list (except for needed callsJeremy Allison1-1/+1
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit 5c050a735f86927c7ef2a98b6f3a56abe39e4674)
2003-10-20more 2.2.x compatibility fixes - allow user looksup in the kerb5Gerald Carter1-13/+10
sesssetup to fall back to 'user' instaed of failing is REA.LM\user doesn't exist. also fix include line in smb_acls.h as requested by metze (This used to be commit 5ccf6baad7ffb1f992aaf24b41ef5c83362cf613)
2003-09-09sync 3.0 into HEAD for the last timeGerald Carter1-14/+8
(This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
2003-08-02port latest changes from SAMBA_3_0 treeSimo Sorce1-16/+55
(This used to be commit 3101c236b8241dc0183995ffceed551876427de4)
2003-07-16trying to get HEAD building again. If you want the codeGerald Carter1-12/+16
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE (This used to be commit adb98e7b7cd0f025b52c570e4034eebf4047b1ad)
2003-05-28It seems only NT4 does the VC == 0 session drop code.Jeremy Allison1-1/+5
Jeremy. (This used to be commit a1fee6594ec90a80478deee48a40d908aecb2e73)
2003-05-27Correct (?) handling for VC = 0. Trying to fix XP logoff leaving resourcesJeremy Allison1-1/+18
around. Jeremy. (This used to be commit 870e111facb4abb01dd1d92739346d764eff056c)
2003-05-27volker's add_signature() fix; must pass the beginning on the outbuf to get ↵Gerald Carter1-5/+5
the flags field (This used to be commit 81cccd25b84871d282815dfa378bd687c5c29cc1)
2003-05-21fix for UNICODE plaintext passwords (bug #59) and fix smbclient to send the ↵Gerald Carter1-1/+4
unicode plain text password if negoitated (This used to be commit 207186e1c8ff0aac2a2aba9c4037d0be0c4819c8)
2003-05-20really make sure to include the version in the lanman string; tested spnego ↵Gerald Carter1-8/+9
using smbclient (This used to be commit a032c38ed473c8365e2ea752d2f332e022092173)
2003-05-14spellingTim Potter1-1/+1
(This used to be commit 249a6974702d050644d6d61f33f0034ce2a689ee)
2003-05-01Fix uninitialized blobs reported by Luke Howard.Jeremy Allison1-0/+6
Jeremy. (This used to be commit e954ca2ce8ec6b36794585c3bc948140cf9e7947)
2003-04-29add version back to lanman string in sessetup replyGerald Carter1-1/+5
(This used to be commit 4ab1909378695383e7e5bd20898392e6d2166969)
2003-04-16Put this comment in a better place...Andrew Bartlett1-3/+3
(This used to be commit 3fdddade0f6d463270c26623a654494ebe3e09bd)
2003-03-16Try to avoid dereferencing a null pointer.Andrew Bartlett1-9/+13
Andrew Bartlett (This used to be commit 4e96585b60512905776c2c6692c76d45241f089d)
2003-03-14fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before ↵Gerald Carter1-17/+18
dereferencing (This used to be commit 2487480228b99183cab9e34ab497997e0c144ed6)
2003-03-12adding some initiaial code to sert %a to Win2K3 (using Native LanMan string ↵Gerald Carter1-0/+2
from .NET RC2) (This used to be commit 4c823e61d14a33344deb887043b60b2e3c83416f)
2003-03-10Don't segfault on make_server_info_guest() failure - instead return theAndrew Bartlett1-4/+2
error code. make_server_info_guest() requires an entry in the SAM at the moment, but this will change before release. Andrew Bartlett (This used to be commit 6a956390fa253e87e38b3f1909f13595fbf2767a)
2003-02-27additional fix for CR 601Gerald Carter1-1/+16
* distinguish WinXP from Win2k * add a 1/3 of a second delay in OpenPrinter in order to trigger a LAN/WAN optimization in 2k clients. (This used to be commit 96570699d1b715f47c35aa211da6ec18f6fc4109)
2003-02-24Patch from Luke Howard to add mutual kerberos authentication, and SMB sessionAndrew Bartlett1-13/+39
keys for kerberos authentication. Andrew Bartlett (This used to be commit 8b798f03dbbdd670ff9af4eb46f7b0845c611e0f)
2003-02-21Fixed compiler warning.Tim Potter1-1/+0
(This used to be commit b3f9cf8c1c293e905a536dfa5bb6a827627b7024)
2003-02-20Like for NTLM logins, lookup the 'winbind' user first, then the 'local' user.Andrew Bartlett1-18/+14
This needs to change, to be a SID->UID lookup from the PAC. Andrew Bartlett (This used to be commit 4071ed06a051f87f27e10510427a69fcdf45ddac)
2003-02-10Some cleanups:Andrew Bartlett1-16/+11
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly instead. - Keep a copy of the 'server_info' attached to the vuid. In future use this for things like the session key, homedir and full name instead of current copies. - Try to avoid memory leak/segfault on Realloc failure - clear up #endif comments Andrew Bartlett (This used to be commit 162477bb086827950b6cb71afa9bef62c2753c2e)
2003-02-07check pointer before dereferencing itGerald Carter1-1/+1
(This used to be commit 786d91d75c909f6d407b8466c89181f26e62e68f)
2003-01-28As per a comment by herb a little while back, this should be >=, not == to keepAndrew Bartlett1-1/+1
identical behaviour with previous versions (This used to be commit 7cbb194b58a4313497541c1f8153533c5034b928)
2003-01-28The previous patch (NTLMSSP common code factoring) was missing a minor detail -Andrew Bartlett1-28/+35
testing :-). This gets the 'signiture' after the extended security blob, rather than over the top of it. Also move that code to the top of the file, with some of the other util functions. Andrew Bartlett (This used to be commit e5c67a012424e71cee340b16946babe2399c0fa1)
2003-01-28Factor out common code in the NTLMSSP/SPNEGO code.Andrew Bartlett1-120/+58
The idea here is to seperate, as much as possible, the SPNEGO layer from the NTLMSSP layer. This not only helps us with protocol correctness, but also should allow further mechinisms to be added with relitive ease. I indend to make the kerberos code use this shortly. I've never seen the 'zero length blob' form of the anonymous login, so I've removed that case. Andrew Bartlett (This used to be commit a8773c9f825539c5bc17e4200b16d7ebbe0b7620)
2003-01-17Remove unused variable in reply_spnego_ntlmssp_okTim Potter1-1/+0
(This used to be commit 60c13a767523e3ec4db7ee5f5c6b20ca07d2a00a)
2003-01-16Updates to the NTLMSSP code again - moving the base64 decode fuctionality outAndrew Bartlett1-5/+4
of the SWAT code, and adding a base64 encoder. The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for use with Squid. Unfortunetly the squid side doesn't quite support what we need yet. Changes to winbind to get us the info we need, and a couple of consequential changes/cleanups in the rest of the code. Andrew Bartlett (This used to be commit fe50ca8f54ded2e119bde08831785fbe0db2ee99)
2003-01-15Refactor the NTLMSSP code again - this time we use function pointers toAndrew Bartlett1-14/+26
eliminate the dependency on the auth subsystem. The next step is to add the required code to 'ntlm_auth', for export to Squid etc. Andrew Bartlett (This used to be commit 9e48ab86da40e4c1cafa70c04fb9ebdcce23dfab)
2003-01-13Updates to our NTLMSSP code:Andrew Bartlett1-194/+88
This tries to extract our server-side code out of sessetup.c, and into a more general lib. I hope this is only a temporay resting place - I indend to refactor it again into an auth-subsystem independent lib, using callbacks. Move some of our our NTLMSSP #defines into a new file, and add two that I found in the COMsource docs - we seem to have a double-up, but I've verified from traces that the NTLMSSP_TARGET_TYPE_{DOMAIN,SERVER} is real. This code also copes with ASCII clients - not that we will ever see any here, but I hope to use this for HTTP, were we can get them. Win2k authenticates fine under forced ASCII, btw. Tested with Win2k, NTLMv2 and Samba's smbclient. Andrew Bartlett (This used to be commit b6641badcbb2fb3bfec9d00a6466318203ea33e1)
2003-01-11No point having this for both parts of the 'if' statement.Andrew Bartlett1-4/+2
Andrew Bartlett (This used to be commit 3b2e5f68cd4e1ff07dbd0032f521b3ba6e53746a)
2003-01-02pstring/fstring missmatches found by Andrew Bartlett.Jeremy Allison1-5/+5
Jeremy. (This used to be commit 585a73b810389129f380cfab1b1b52700b350055)
2002-11-19a better for for using %U in smb.confAndrew Tridgell1-0/+11
this follows the method used for remote_machine and also fixes the problem of anonymous connections clobbering the string (This used to be commit 9ead4fc3c3f8b83f03c762a4dab77a64aabccbf9)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-3/+2
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-09-25Metze claims that without this his win2k server gets horribly confused lookingAndrew Bartlett1-2/+2
for all sorts of AD things in lp_realm(). We need to get some non-Win2k NTLMSSP and chase this up a bit, but this will do for now. (Hmm, this might affect NTLMv2 as well) Andrew Bartlett (This used to be commit 0e6babc306f60e88fc28705a8d4ad112bafe92cb)
2002-09-25Kill of Get_Pwnam_Modify and smb_getpwnam(). The latter assumes some thingsAndrew Bartlett1-2/+2
that just don't apply any more - now that we always keep username and domain seperate. Also, the policy it was trying to permit is now implemented by the auth code. Andrew Bartlett (This used to be commit 760c0740cad948665db4a1d462fbbd99332713ef)
2002-09-20"@" is valid in NetBIOS domain names.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 5c4857d8e00162fc43a0f2e3a335b441bad743bd)
2002-09-06This is the 'easy' parts of the trusted domains patch n+3 patch fromAndrew Bartlett1-13/+11
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> It includes a conversion of make_user_info*() to NTSTATUS and some minor changes to other files. It also picks up on a nasty segfault that can occour in some security=domain cases. Andrew Bartlett (This used to be commit d1e1fc3e4bf72717b3593685f0ea5750d676952a)
2002-09-06Revert accidental commit - I'll need to do a fair bit more testing before IAndrew Bartlett1-3/+0
commit changes to NTLMSSP flags. (This used to be commit d200770796d871b3994a06fab45624068fdc5682)
2002-09-06Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de>Andrew Bartlett1-0/+3
to extend the ADS_STATUS system to include NTSTATUS, and to provide a better general infrustructure for his sam_ads work. I've also added some extra failure mode DEBUG()s to parts of the code. NOTE: The ADS_ERR_OK() macro is rather sensitive to braketing issues - without the final set of brakets, the test is essentially inverted - causing some intersting 'error = success' messages... Andrew Bartlett (This used to be commit 5b9a7ab901bc311f3ad08462a8a68d133c34a8b4)
2002-08-31Add a bit of 'const' and move a lot of our 'repeditive' DEBUG() statements toAndrew Bartlett1-2/+0
'DEBUGADD', so we don't repeat headers. (Makes them much easier to read). (Based on patch by kai) Andrew Bartlett (This used to be commit 9deada345c5f89f338530c4de62835cc1eeb3d0e)
2002-08-20Based orginally by work by Kai, this patch moves our NT_TOKEN generation intoAndrew Bartlett1-2/+2
our authenticaion code - removing some of the duplication from the current code. This also gets us *much* closer to supporting a real SAM backend, becouse the SAM can give us the right info then. This also changes our service.c code, so that we do a VUID (rather than uid) cache on the connection struct, and do full NT ACL/NT_TOKEN checks (or cached equivilant) on every packet, for the same r or rw mode the whole share was open for. Andrew Bartlett (This used to be commit d8122cee059fc7098bfa7e42e638a9958b3ac902)
2002-08-17Change which session key we negotiate. This uses the NT-based session key thatAndrew Bartlett1-1/+1
we previously expected, rather than the LM based key. A Win2k SPNEGO enabled join goes a *lot* further with this option on. Andrew Bartlett (This used to be commit b224938e4e843288630cdc7c3c3931b241bd0e1a)