summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/cliconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* cli_connect_nb_send: don't segfault on host == NULL.Michael Adam2015-01-191-7/+15
| | | | | | | | | | | | | | | The functions called futher down can cope with host == NULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11058 This is part one of the bugfix: This ensures that it is enough to pass one of host or address to the function. Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: let cli_session_setup_kerberos_recv() return a useful error codeStefan Metzmacher2014-12-181-6/+22
| | | | | | | | | | Forcing NT_STATUS_UNSUCCESSFUL is not a good idea, we should return NT_STATUS_LOGON_FAILURE instead. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11010 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: remove unused variables in cliconnect.cStefan Metzmacher2014-11-251-3/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: avoid calling cli_set_username() cliconnect.cStefan Metzmacher2014-10-171-33/+1
| | | | | | Change-Id: I45e44405ea51ecb1aa38c72f4fc6243a1d3d531a Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: Remove unused domain copy stored in cli_stateStefan Metzmacher2014-10-171-2/+2
| | | | | | Change-Id: I7333140906bb3a487205b5760396dcc00a9f49b0 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Remove unused password copy stored in cli_stateAndrew Bartlett2014-10-171-4/+2
| | | | | | Change-Id: Ia6b33a25628ae08be8a8c6baeb71ce390315cb45 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libsmb: Print the principal name that we failed to kinit for.Andrew Bartlett2014-10-171-6/+7
| | | | | | | | | | This should aid debugging when this is called from an automated process. Andrew Bartlett Change-Id: I2c7291ab3f67f9f7462d7c52c8c9a4b042f7ec5a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: remove unused smb2cli.hStefan Metzmacher2014-09-301-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* libcli/smb: move smb2cli_tcon.c to the toplevelStefan Metzmacher2014-09-301-2/+22
| | | | | | | removing use of cli_state from the code. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: rename lp function and variable from "cli_minprotocol" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "client_min_protocol" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "cli_maxprotocol" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "client_max_protocol" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb fix a compiler warningChristian Ambach2013-12-121-1/+1
| | | | | | | about a potentially uninitialized variable Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Fix CID 242665 Out-of-bounds accessVolker Lendecke2013-11-131-3/+7
| | | | | | | | | | | Coverity is confused by the dual-use of "pss" as an array of size 1. This is not strictly a bug here, but it is admittedly a small subtlety. It should fix a whole bunch of Coverity issues. Normally I would resist to change our code in response to a deficient static checker, but here I would vote for this compromise. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libsmb: remove unused cli_state->dfsrootStefan Metzmacher2013-10-171-6/+0
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:libsmb: make use of smb1cli_tcon_set_values()Stefan Metzmacher2013-10-171-2/+17
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:libsmb: call smb2cli_logoff() from cli_ulogoff()Stefan Metzmacher2013-08-151-0/+12
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 15 10:53:21 CEST 2013 on sn-devel-104
* s3:libsmb: make cli_ulogoff_send/recv staticStefan Metzmacher2013-08-151-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: call smb2cli_tdis() from cli_tdis()Stefan Metzmacher2013-08-151-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: make cli_tdis_send/recv staticStefan Metzmacher2013-08-151-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: Ensure we ask for DEFAULT_SMB2_MAX_CREDITS on successful negprot.Jeremy Allison2013-08-151-0/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: Modify cli_start_connection_connected() to use ↵Jeremy Allison2013-08-151-1/+2
| | | | | | | | | lp_cli_minprotocol()/lp_cli_maxprotocol() instead of hard coding PROTOCOL_CORE, PROTOCOL_NT1. https://bugzilla.samba.org/show_bug.cgi?id=9514 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: remove unused cli_state->is_guestloginStefan Metzmacher2013-08-101-5/+0
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libsmb: call directly tevent_req_simple_finish_ntstatusMatthieu Patou2013-05-061-2/+2
| | | | | | | | | | | | | The CC compiler on openindiana is not pleased with a void function doing a return of another void function. It should help the build of openindiana on the buildfarm Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon May 6 08:35:10 CEST 2013 on sn-devel-104
* libsmbclient: Make cli_full_connection asyncVolker Lendecke2013-04-111-50/+190
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Make cli_tree_connect asyncVolker Lendecke2013-04-111-14/+109
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Make cli_raw_tcon asyncVolker Lendecke2013-04-111-15/+83
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Streamline cli_tcon_andx a bitVolker Lendecke2013-04-111-3/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Use tevent_req_poll_ntstatus in cli_tcon_andxVolker Lendecke2013-04-111-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Make cli_start_connection asyncVolker Lendecke2013-04-111-18/+102
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Remove unused cli_connect_sockVolker Lendecke2013-04-111-32/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Add async cli_connect_nbVolker Lendecke2013-04-111-24/+94
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Avoid a talloc_strdup in cli_connect_nbVolker Lendecke2013-04-111-4/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Make cli_connect_sock asyncVolker Lendecke2013-04-111-40/+126
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Remove unused sync wrappersVolker Lendecke2013-04-111-201/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Add async cli_session_setupVolker Lendecke2013-04-111-42/+215
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Remove unused cli_session_setup_ntlmssp()Volker Lendecke2013-04-111-29/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Add async cli_session_setup_ntlmsspVolker Lendecke2013-04-111-24/+146
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Factor out cli_session_setup_get_accountVolker Lendecke2013-04-111-9/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Slightly simplify cli_session_setup_spnegoVolker Lendecke2013-04-111-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Factor out cli_session_setup_get_principalVolker Lendecke2013-04-111-36/+49
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Avoid a data copyVolker Lendecke2013-04-111-9/+5
| | | | | | | | spnego_parse_negTokenInit does a asn_load of that blob, which does a data copy itself. So we don't have to had it a copy as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Fix a leak on talloc_tos()Volker Lendecke2013-04-111-1/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Fix cli_session_setup_guest_sendVolker Lendecke2013-04-031-1/+1
| | | | | | | | | | | | | | This worked fine so far, but for the wrong reason: We only ever called this through the sync wrapper. The tevent_req_nterror in the NT_STATUS_OK case does not call tevent_req_finish. So the tevent_loop_poll did call into the core send/receive smb code. This is a fix for the case when smb1cli_req_chain_submit fails for some reason. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 3 18:39:30 CEST 2013 on sn-devel-104
* s3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASKStefan Metzmacher2013-03-201-2/+6
| | | | | | | | This should allow smbclient to keep using large reads against older Samba versions (<= 3.6.x) and other servers that may also require this. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: s/struct event_context/struct tevent_contextStefan Metzmacher2013-02-191-9/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:libsmb: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-9/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Avoid overriding default ccache for ads operations.Simo Sorce2012-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Avoid overriding default ccache for ads operations. Nowadays various samba components may need to use GSSAPI and a default cred cache to perform their tasks. This code was completely overriding the whole process default ccache name, thus altering the current credentials and sometimes hijacking them (or getting preemptively hijaked). By using gss_krb5_import_cred we can instead use a private ccache (necessary sometimes to use a different set of credentials fromt he default cifs/fqdn@realm one, for example when contacting foreign DCs using trust credentials) that does not affect the rest of the process. For the kerberos versions which don't have gss_krb5_import_cred we fallback to temp override of KRB5CCNAME and gss_acquire_cred. Signed-off-by: Alexander Bokovoy <ab@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Sep 12 21:18:09 CEST 2012 on sn-devel-104
* Check error returns from strupper_m() (in all reasonable places).Jeremy Allison2012-08-091-1/+3
|
* s3:libsmb: add EXTENDED_SIGNATURE support in cli_tcon_andx*()Stefan Metzmacher2012-08-041-0/+5
| | | | metze
* s3:libsmb: add a optional_support helper variableStefan Metzmacher2012-08-011-1/+6
| | | | metze