summaryrefslogtreecommitdiffstats
path: root/source/libsmb/cliconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* Some more good stuff from coolo.Richard Sharpe2003-04-041-0/+71
|
* added a simple test for the old SMBtcon interfaceAndrew Tridgell2003-03-291-1/+42
|
* Specify buffer sizesAndrew Bartlett2003-03-151-2/+2
|
* Further work on NTLMSSP-based SMB signing. Current status is that I cannnotAndrew Bartlett2003-03-101-6/+41
| | | | | | | | | | | | | | | | get Win2k to send a valid signiture in it's session setup reply - which it will give to win2k clients. So, I need to look at becoming 'more like MS', but for now I'll get this code into the tree. It's actually based on the TNG cli_pipe_ntlmssp.c, as it was slightly easier to understand than our own (but only the utility functions remain in any way intact...). This includes the mysical 'NTLM2' code - I have no idea if it actually works. (I couldn't get TNG to use it for its pipes either). Andrew Bartlett
* Change the way we sign SMB packets, to a function pointer interface.Andrew Bartlett2003-03-091-44/+3
| | | | | | | | The intention is to allow for NTLMSSP and kerberos signing of packets, but for now it's just what I call 'simple' signing. (aka SMB signing per the SNIA spec) Andrew Bartlett
* Connectathon fix. W2K -> W2K over port 445 doing a tconX does the fullJeremy Allison2003-03-051-7/+2
| | | | | | \\server\share syntax, not just a "share" tconX syntax. This broke interop with a vendor. Jeremy.
* Patch from Luke Howard to add mutual kerberos authentication, and SMB sessionAndrew Bartlett2003-02-241-1/+1
| | | | | | keys for kerberos authentication. Andrew Bartlett
* Doesn't anyone run ./configure.developer anymore?Tim Potter2003-02-211-1/+1
|
* Only do a kinit if we got told to use kerberos.Andrew Bartlett2003-02-191-12/+12
| | | | Andrew Bartlett
* Add the 'session key' output of the NTLMSSP exchange to the cli struct, soAndrew Bartlett2003-02-161-0/+11
| | | | | | | | | it can be used for 'net rpc join'. Also fix a bug in our server-side NTLMSSP code - a client without any domain trust links to us may calculate the NTLMv2 response with "" as the domain. Andrew Bartlett
* Move our NTLMSSP client code into ntlmssp.c. The intention is to provide aAndrew Bartlett2003-02-151-113/+66
| | | | | | | | | | relitivly useful external lib from this code, and to remove the dupicate NTLMSSP code elsewhere in samba (RPC pipes, LDAP client). The code I've replaced this with in cliconnect.c is relitivly ugly, and I hope to replace it with a more general SPENGO layer at some later date. Andrew Bartlett
* Antti Andreimann <Antti.Andreimann@mail.ee> has done some changes to enableAndrew Bartlett2003-02-151-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | users w/o full administrative access on computer accounts to join a computer into AD domain. The patch and detailed changelog is available at: http://www.itcollege.ee/~aandreim/samba This is a list of changes in general: 1. When creating machine account do not fail if SD cannot be changed. setting SD is not mandatory and join will work perfectly without it. 2. Implement KPASSWD CHANGEPW protocol for changing trust password so machine account does not need to have reset password right for itself. 3. Command line utilities no longer interfere with user's existing kerberos ticket cache. 4. Command line utilities can do kerberos authentication even if username is specified (-U). Initial TGT will be requested in this case. I've modified the patch to share the kinit code, rather than copying it, and updated it to current CVS. The other change included in the original patch (local realms) has been left out for now. Andrew Bartlett
* Further extract our NTLMv2 code into smbencrypt.c, prior to merge into ourAndrew Bartlett2003-02-141-32/+20
| | | | | | NTLMSSP client code. Andrew Bartlett
* Clean up our NTLMv2 code by moving the grunt work into a helper function.Andrew Bartlett2003-02-101-41/+7
| | | | Andrew Bartlett
* (only for HEAD at the moment).Andrew Bartlett2003-02-091-31/+107
| | | | | | | | | | | | Add NTLMv2 support to our client, used when so configured ('client use NTLMv2 = yes') and only when 'client use spengo = no'. (A new option to allow the client and server ends to chose spnego seperatly). NTLMv2 signing doesn't yet work, and NTLMv2 is not done for NTLMSSP yet. Also some parinoia checks in our input parsing. Andrew Bartlett
* Add some return values, and don't attempt signing for NTLMSSP yet (it uses aAndrew Bartlett2003-02-021-3/+1
| | | | | | different algorithm). Andrew Bartlett
* We now have client-side SMB signing support!Andrew Bartlett2003-02-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | This checking allows us to connect to Microsoft servers the use SMB signing, within a few restrictions: - I've not get the NTLMSSP stuff going - it appears to work, but if you break the sig - say by writing a zero in it - it still passes... - We don't currently verfiy the server's reply - It works against one of my test servers, but not the other... However, it provides an excellent basis to work from. Enable it with 'client signing' in your smb.conf. Doc to come (tomorrow) and this is not for 3.0, till we get it complete. The CIFS Spec is misleading - the session key (for NTLMv1 at least) is the standard session key, ie MD4(NT#). Thanks to jra for the early work on this. Andrew Bartlett
* Refactor the NTLMSSP code again - this time we use function pointers toAndrew Bartlett2003-01-151-1/+2
| | | | | | | 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
* Updates to our NTLMSSP code:Andrew Bartlett2003-01-131-2/+2
| | | | | | | | | | | | | | | | | | 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
* Fixed bug in debug statement when tconX fails.Tim Potter2002-12-201-1/+1
|
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-26/+25
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* patches from UrbanGerald Carter2002-11-081-0/+3
|
* Merge of scalable printing code fix... Needs testing.Jeremy Allison2002-11-071-1/+1
| | | | | | | Also tidied up some of Richard's code (I don't think he uses the compiler flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like I do :-) :-). Jeremy.
* Added new error codes. Fix up connection code to retry in the same wayJeremy Allison2002-10-171-1/+11
| | | | | that app-head does. Jeremy.
* merge of working dsrolegetprimdominfo() client code from APP_HEADGerald Carter2002-10-041-1/+1
|
* Ok, hopefully final fix for this one. abartlet told a bit about theVolker Lendecke2002-09-281-7/+1
| | | | | | history. Volker
* Thanks to abartlet I looked at that function a bit closer. What didVolker Lendecke2002-09-281-5/+0
| | | | | | | the first cli_push_string do? I suspect that it's a leftover from times when the password length was needed at some point. Volker
* Touching somebody else's code again... Sorry, Richard.Volker Lendecke2002-09-271-2/+9
| | | | | | | | | smbclient would announce that it can send UNICODE, but would send the plain text password in ASCII. This confused Samba HEAD somewhat. This change has been tested against Samba HEAD of today and Samba 2.2.1a. I do not have any other servers that do plain text passwords. Anybody? Volker
* Don't uppercase the username and domain in a session setup.Tim Potter2002-09-231-2/+2
|
* Add clock skew handling to our kerberos code. This allows us to cope withAndrew Tridgell2002-09-171-1/+1
| | | | the DC being out of sync with the local machine.
* Merge the cli_shutdown change from 2_2. All except one call toVolker Lendecke2002-09-111-2/+0
| | | | | | | attempt_netbios_... assumed that cli_shutdown was _not_ called on error anyway... Volker
* Fix the struct_blob.Richard Sharpe2002-09-031-5/+8
|
* Fix crashbug discovered by "Kim R. Pedersen" <krp@filanet.dk> whereJeremy Allison2002-09-031-1/+7
| | | | | cli struct was being deallocated in a called function. Jeremy.
* Formatting tidyup and additon of cli_close_connection() before bugfix.Jeremy Allison2002-09-031-69/+46
| | | | Jeremy.
* Fix the client side NTLMSSP. It now works between smbclient and smbd!Richard Sharpe2002-09-031-3/+6
| | | | However, it does not work with Win2K over 445 with raw NTLMSSP!
* Parse the NTLMSSP Challenge in cliconnect.c.Richard Sharpe2002-09-031-2/+28
| | | | This gets us closer ... Should have the challenge now. Need to check that it works.
* Make sure that an NTLMSSP negotiate blob has the correct stuff in it!Richard Sharpe2002-09-031-2/+3
|
* The session key in NTLMSSP AUTH blobs is actually an empty string.Richard Sharpe2002-09-031-1/+1
| | | | | Also, the negotiate blob has two ASCI strings encoded in the same way that the UNICODE strings are, they are just in ASCII. The PARSER and Generator will have to deal with that.
* convert the LDAP/SASL code to use GSS-SPNEGO if possibleAndrew Tridgell2002-08-301-4/+9
| | | | | | | | | | | | | | | | we now do this: - look for suported SASL mechanisms on the LDAP server - choose GSS-SPNEGO if possible - within GSS-SPNEGO choose KRB5 if we can do a kinit - otherwise use NTLMSSP This change also means that we no longer rely on having a gssapi library to do ADS. todo: - add TLS/SSL support over LDAP - change to using LDAP/SSL for password change in ADS
* Some fixes for SMB signing. I can now get Win2k to correctly respond with aAndrew Bartlett2002-08-261-3/+14
| | | | | | security signiture, but I can't get it to accept ours. Andrew Bartlett
* Updates!Andrew Bartlett2002-08-261-27/+47
| | | | | | | | | | | - Don't print an uninitialised buffer in service.c - Change some charcnv.c functions to take smb_ucs2_t ** instead of void ** - Update NTLMv2 code to use dynamic buffers - Update experimental SMB signing code - still more work to do - Move sys_getgrouplist() to SAFE_FREE() and do a DEBUG() on initgroups() failure. Andrew Bartlett
* move where got_sig_term and reload_after_sighup are defined.Herb Lewis2002-08-221-9/+9
| | | | | populate cli structure with called name and calling name even for port 445 connects.
* fixed memory corruption in cli_full_connection()Andrew Tridgell2002-08-191-2/+1
|
* this fixes plaintext passwords with win2000Andrew Tridgell2002-07-301-3/+2
| | | | | | | | | | there were 2 bugs: 1) we were sending a null challenge when we should have sent an empty challenge 2) the password can be in unicode if unicode is negotiated. This means our client code was wrong too :(
* Mimir has been busy with patches again, and sent in the followingAndrew Bartlett2002-07-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | patches: Andrew Bartlett From his e-mail: Below I attach the following patches as a result of my work on trusted domains support: 1) srv_samr_nt.c.diff This fixes a bug which caused to return null string as the first entry of enumerated accounts list (no matter what entry, it was always null string and rid) and possibly spoiled further names, depeding on their length. I found that while testing my 'net rpc trustdom list' against nt servers and samba server. 2) libsmb.diff Now, fallback to anonymous connection works correctly. 3) smbpasswd.c.diff Just a little fix which actually allows one to create a trusting domain account using smbpasswd 4) typos.diff As the name suggests, it's just a few typos fix :)
* fixed a segv in net time when the host is unavailableAndrew Tridgell2002-07-221-1/+1
|
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-201-8/+20
| | | | | | | | distinction between uchar and char). Lots of const etc. Andrew Bartlett
* Fix up char/uchar casts etc. Fix up comments on some of the password hashAndrew Bartlett2002-07-201-8/+5
| | | | | | wrappers. Andrew Bartlett
* checking for NULL really is counter-productive, and this one was alsoAndrew Tridgell2002-07-151-5/+0
| | | | generating a warning
* The 17-bit length field in the header contains the number ofChristopher R. Hertel2002-07-011-1/+8
| | | | | | | | | | | | | | | | | | bytes which follow the header, not the full packet size. [Yes, the length field is either 17-bits, or (per the RFCs) it is a 16-bit length field preceeded by an 8-bit flags field of which only the low-order bit may be used. If that bit is set, then add 65536 to the 16-bit length field. (In other words, it's a 17-bit unsigned length field.) ...unless, of course, the transport is native TCP [port 445] in which case the length field *might* be 24-bits wide.] Anyway, the change is a very minor one. We were including the four bytes of the header in the length count and, as a result, sending four bytes of garbage at the end of the SESSION REQUEST packet. Small fix in function cli_session_request().