summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/cliconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* When doing a cli_ulogoff don't invalidate the cnum, invalidate the vuid.Jeremy Allison2009-04-281-1/+1
| | | | | Jeremy. (cherry picked from commit be46b98ee38e17e4561ab58fe9b6ecc6b7919392)
* Fix connect to port 139 only -- thanks gd for bugging me :-)Volker Lendecke2009-04-151-4/+3
| | | | | (cherry picked from commit 298bff5019be5a40dc0023b5af1e980fba91abd9) (cherry picked from commit c96d0ffd944f536a1228812c761ba4fb4313ee05)
* Convert open_socket_out_defer to tevent_reqVolker Lendecke2009-04-151-22/+37
| | | | | (cherry picked from commit 20cee26a3dbd231672eec9133c6e84641def298d) (cherry picked from commit 1e08799f3c5bb7059f6d355b99f8617461c31d1a)
* Remove pwd_cache.c, it was doing nothing. Make user_name, domain, andJeremy Allison2009-04-151-7/+28
| | | | | | password talloc'ed strings within the cli_struct. Jeremy. (cherry picked from commit 6be4bf17de47d1b468389de1225a72daa94e0119)
* Fix a smbclient segfault against security=share serversVolker Lendecke2009-03-071-3/+10
|
* s3:libsmb: remove cli_setup_signing_state() and add struct cli_state ↵Stefan Metzmacher2009-03-061-3/+1
| | | | | | | | *cli_initialise_ex() This prepares the next changes. metze
* s3:libsmb: smb signing works the same for extented and non-extended securityStefan Metzmacher2009-03-061-5/+18
| | | | | | This is only cosmetic, but it makes it easier to understand. metze
* Convert name_mangle() to use tallocVolker Lendecke2009-02-241-4/+21
|
* Do not use strlen if not necessary... :-)Volker Lendecke2009-02-101-4/+2
|
* Fix Coverity ID 870Volker Lendecke2009-02-031-0/+4
|
* Split up async_req into a generic and a NTSTATUS specific partVolker Lendecke2009-02-011-4/+4
|
* Make cli_tcon_andx asyncVolker Lendecke2009-01-301-50/+147
|
* Make cli_session_setup_guest asyncVolker Lendecke2009-01-301-37/+103
|
* Add the strlen to push to smb_bytes_push_str, return the converted sizeVolker Lendecke2009-01-291-1/+4
| | | | | The pushed strlen replaces the STR_TERMINATE flag which I personally always find very confusing.
* Decouple clistr_pull from struct cli_state->inbufVolker Lendecke2009-01-261-13/+25
|
* s3: make better use of ccache by not including version.h in every C-file.Michael Adam2009-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | version.h changes rather frequently. Since it is included via includes.h, this means each C file will be a cache miss. This applies to the following situations: * When building a new package with a new Samba version * building in a git branch after calling mkversion.sh after a new commit (i.e. virtually always) This patch improves the situation in the following way: * remove inlude "version.h" from includes.h * Use samba_version_string() instead of SAMBA_VERSION_STRING in files that use no other macro from version.h instead of SAMBA_VERSION_STRING. * explicitly include "version.h" in those files that use more macros from "version.h" than just SAMBA_VERSION_STRING. Michael
* Remove smbclient globals that bled into clidfs.c. Now we only haveJeremy Allison2009-01-141-5/+1
| | | | | the connections list and authentication structures to worry about. Jeremy
* s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp casesStefan Metzmacher2009-01-121-16/+35
| | | | | | | | | | | | | | | | | | | | | | | SMB signing works the same regardless of the used auth mech. We need to start with the temp signing ("BSRSPYL ") and the session setup response with NT_STATUS_OK is the first signed packet. Now we set the krb5 session key if we got the NT_STATUS_OK from the server and then recheck the packet. All this is needed to make the fallback from krb5 to ntlmssp possible. This commit also resets the cli->vuid value to 0, if the krb5 auth didn't succeed. Otherwise the server handles NTLMSSP packets as krb5 packets. The restructuring of the SMB signing code is needed to make sure the krb5 code only starts the signing engine on success. Otherwise the NTLMSSP fallback could not initialize the signing engine (again). metze
* Simulate the Windows behaviour to fire 445 and after a timeout 139Volker Lendecke2009-01-041-14/+76
|
* Async wrapper for open_socket_out_send/recvVolker Lendecke2009-01-041-8/+15
|
* open_socket_out is always used with SOCK_STREAM, remove argument "type"Volker Lendecke2009-01-031-7/+5
|
* Pass "bytes_alignment" up through cli_request_sendVolker Lendecke2008-12-191-1/+1
| | | | This parameter makes smb_spice_chain add padding before the bytes field
* Make cli_negprot asyncVolker Lendecke2008-12-191-50/+97
|
* Make cli_negprot return NTSTATUS instead of boolVolker Lendecke2008-12-191-16/+17
|
* cli_negprot_send -> cli_negprot_sendsyncVolker Lendecke2008-12-191-1/+1
|
* Remove a pointless static variableVolker Lendecke2008-12-131-7/+7
| | | | Every sane compiler will only allocate "*SMBSERVER" once
* Micro-Optimize cliconnect.cVolker Lendecke2008-12-131-22/+27
| | | | | | | In this form, the prots array is fully read-only in the text segment and thus can be shared between processes. Probably pointless, but I had fun doing it :-)
* Slightly simplify cli_session_setup_ntlmsspVolker Lendecke2008-12-071-10/+2
| | | | Remove three pointless variables
* s3: Change sockaddr util function names for consistencyTim Prouty2008-12-031-1/+1
| | | | Also eliminates name conflicts with OneFS system libraries
* Do not build the session request if it si not used anywayVolker Lendecke2008-11-301-4/+4
|
* fix nonempty blank linesVolker Lendecke2008-11-301-19/+19
|
* Make use of smb_bufrem()Volker Lendecke2008-11-011-1/+1
|
* Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij2008-10-231-1/+1
| | | | | otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
* s3: use shared asn1 code.Günther Deschner2008-10-221-7/+8
| | | | Guenther
* Fix bug #5675 with a varient of Tim Waugh's patch,Jeremy Allison2008-08-071-3/+2
| | | | | | as proposed by James Peach. Jeremy. (This used to be commit 5c27ad75836136c39774c9456d63f46fa62e281f)
* Fix bug reported by David Eisner <deisner@gmail.com>. When allocating cliJeremy Allison2008-06-021-3/+3
| | | | | | | buffers for large read/write - make sure we take account of the large read/write SMB headers as well as the buffer space. Jeremy. (This used to be commit 19519bca9b64b736d2fe0447b7cd495f00dba60a)
* Manually merge Steven Danneman's patch for SPNEGO auth to a trustedGerald W. Carter2008-05-231-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Win2008 domain (merged from v3-0-test). commit 8dc4e979776aae0ecaa74b51dc1eac78a7631405 Author: Steven Danneman <sdanneman@isilon.com> Date: Wed May 7 13:34:26 2008 -0700 spnego SPN fix when contacting trusted domains cli_session_setup_spnego() was not taking into consideration the situation where we're connecting to a trusted domain, specifically one (like W2K8) which doesn't return a SPN in the NegTokenInit. This caused two problems: 1) When guessing the SPN using kerberos_get_default_realm_from_ccache() we were always using our default realm, not the realm of the domain we're connecting to. 2) When falling back on NTLMSSP for authentication we were passing the name of the domain we're connecting to for use in our credentials when we should be passing our own workgroup name. The fix for both was to split the single "domain" parameter into "user_domain" and "dest_realm" parameters. We use the "user_domain" parameter to pass into the NTLM call, and we used "dest_realm" to create an SPN if none was returned in the NegTokenInit2 packet. If no "dest_realm" is provided we assume we're connecting to our own domain and use the credentials cache to build the SPN. Since we have a reasonable guess at the SPN, I removed the check that defaults us directly to NTLM when negHint is empty. (This used to be commit b78b14c88e8354aadf9ba7644bdb1c29245fe419)
* build: fix the build w/o ldap.Günther Deschner2008-05-061-1/+3
| | | | | Guenther (This used to be commit a159ec5f1f3ec8e9232b8f3230a996a3f9986bc1)
* Fix client authentication with -P switch in client tools (Bug 5435).Günther Deschner2008-05-051-2/+20
| | | | | Guenther (This used to be commit d077ef64cd1d9bbaeb936566c2c70da508de829f)
* Move srv_name_slash from cli_state to rpc_pipe_clientVolker Lendecke2008-04-201-2/+0
| | | | (This used to be commit a9061e52e1ff8e31aa480f4a30cda64c9d93214e)
* Add CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS define.Günther Deschner2008-04-081-0/+5
| | | | | | | This allows to switch on the cli->fallback_after_kerberos switch. Guenther (This used to be commit 15ba45e567d910c1b2336dcc0c475e12b082f30f)
* Fix a misleading debug messageVolker Lendecke2008-04-071-2/+3
| | | | (This used to be commit 494b32197f0872b115f0cd1a35421d00a89360a6)
* When using plaintext ucs2 passwords clistr_push calls ucs2_align, which causesJeremy Allison2008-04-041-3/+9
| | | | | | | | | | the space taken by the unicode password to be one byte too long (as we're on an odd byte boundary here). Reduce the count by 1 to cope with this. Fixes smbclient against NetApp servers which can't cope. Fix from bryan.kolodziej@allenlund.com in bug #3840. Jeremy. (This used to be commit 1e7e7d86a1ae1cd2c3cc3de9f36b7326ad249b82)
* Always uppercase cli->srv_name_slash.Günther Deschner2008-04-041-0/+1
| | | | | | | Not that I think it is of any importance... Guenther (This used to be commit 352f8440c74bc22416e21783e1dc5fecf5869902)
* For convenience reasons, always create cli->srv_name_slash in the rpc_client.Günther Deschner2008-03-121-0/+1
| | | | | Guenther (This used to be commit 6363c383d6989d2dfb2ee488ffa7aeb128c5385b)
* Add explicit buf arg to cli_check_sign_macVolker Lendecke2008-02-281-1/+1
| | | | (This used to be commit ffc1c8cc03e6bad40ed2be91392074b4f038a1bf)
* Add explicit buf arg to cli_encrypt_message and cli_calculate_sign_macVolker Lendecke2008-02-281-1/+1
| | | | (This used to be commit db6ae9ed2326e6cd68475375d049084cf1d5a98c)
* Fix typoVolker Lendecke2008-02-231-2/+2
| | | | (This used to be commit 621db68f32f7007de8b2c4d7cf604a5778725615)
* Add a missing returnVolker Lendecke2008-02-111-1/+1
| | | | | | | | | | If I'm not completely blind, we should return here. Not doing it here seems not to be a major flaw, as far as I can see we're only missing the error code. This might account for some of the very unhelpful NT_STATUS_UNSUCCESSFUL error messages people see during joins. All with stake in Samba client, please check! (This used to be commit eadd15c9363a57c214ede3c489057646baca48f8)
* Don't leak memory in error path.Jeremy Allison2008-01-231-0/+1
| | | | | Jeremy. (This used to be commit 2df0cdaafdced798f81e30d34371aa1d8e963208)