1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

497 Commits

Author SHA1 Message Date
Stefan Metzmacher
b706ca6e55 s3:libsmb: call smb2cli_logoff() from cli_ulogoff()
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
2013-08-15 10:53:21 +02:00
Stefan Metzmacher
1d7bdfc4fe s3:libsmb: make cli_ulogoff_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
e6be68fb5e s3:libsmb: call smb2cli_tdis() from cli_tdis()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
80d4f64352 s3:libsmb: make cli_tdis_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
14421323d1 s3:libsmb: Ensure we ask for DEFAULT_SMB2_MAX_CREDITS on successful negprot.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:05 +02:00
Jeremy Allison
42f510c155 s3:libsmb: Modify cli_start_connection_connected() to use 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>
2013-08-15 09:07:05 +02:00
Stefan Metzmacher
11e0be0e72 s3:libsmb: remove unused cli_state->is_guestlogin
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:52 +02:00
Matthieu Patou
99c95fc983 libsmb: call directly tevent_req_simple_finish_ntstatus
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
2013-05-06 08:35:10 +02:00
Volker Lendecke
cd2cc97df2 libsmbclient: Make cli_full_connection async
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:52:56 -07:00
Volker Lendecke
5daf6476fa libsmbclient: Make cli_tree_connect async
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:46:36 -07:00
Volker Lendecke
6d1dc76952 libsmbclient: Make cli_raw_tcon async
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:45:50 -07:00
Volker Lendecke
6bed164c15 libsmbclient: Streamline cli_tcon_andx a bit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:44:43 -07:00
Volker Lendecke
80097ac122 libsmbclient: Use tevent_req_poll_ntstatus in cli_tcon_andx
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:44:22 -07:00
Volker Lendecke
47a1de356e libsmbclient: Make cli_start_connection async
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:43:31 -07:00
Volker Lendecke
82b3069c30 libsmbclient: Remove unused cli_connect_sock
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:43:06 -07:00
Volker Lendecke
48053b77f9 libsmbclient: Add async cli_connect_nb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:42:02 -07:00
Volker Lendecke
a7c02f9a6e libsmbclient: Avoid a talloc_strdup in cli_connect_nb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:41:25 -07:00
Volker Lendecke
3b3dacf20d libsmbclient: Make cli_connect_sock async
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:38:44 -07:00
Volker Lendecke
9879c88e91 libsmbclient: Remove unused sync wrappers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:38:06 -07:00
Volker Lendecke
0e1e0a6e41 libsmbclient: Add async cli_session_setup
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:35:44 -07:00
Volker Lendecke
dc796331ca libsmbclient: Remove unused cli_session_setup_ntlmssp()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:35:14 -07:00
Volker Lendecke
26359c25ef libsmbclient: Add async cli_session_setup_ntlmssp
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:26:38 -07:00
Volker Lendecke
e2e0449a58 libsmbclient: Factor out cli_session_setup_get_account
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:25:49 -07:00
Volker Lendecke
0008d9e1c5 libsmbclient: Slightly simplify cli_session_setup_spnego
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 14:24:20 -07:00
Volker Lendecke
4627699e4f libsmbclient: Factor out cli_session_setup_get_principal
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 13:59:08 -07:00
Volker Lendecke
54316ea339 libsmbclient: Avoid a data copy
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>
2013-04-11 13:57:58 -07:00
Volker Lendecke
fbda7826b8 libsmbclient: Fix a leak on talloc_tos()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11 13:57:44 -07:00
Volker Lendecke
b5d5b9a40e libsmbclient: Fix cli_session_setup_guest_send
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
2013-04-03 18:39:30 +02:00
Stefan Metzmacher
b041dc9451 s3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASK
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>
2013-03-20 09:32:25 -07:00
Stefan Metzmacher
d0bca41f48 s3:libsmb: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:54 +01:00
Stefan Metzmacher
c8dda78e35 s3:libsmb: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:46 +01:00
Simo Sorce
893b213876 Avoid overriding default ccache for ads operations.
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
2012-09-12 21:18:09 +02:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Stefan Metzmacher
c32120b4e9 s3:libsmb: add EXTENDED_SIGNATURE support in cli_tcon_andx*()
metze
2012-08-04 09:10:22 +02:00
Stefan Metzmacher
3682eb80ab s3:libsmb: add a optional_support helper variable
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
137d65b397 s3:libsmb: add a tcon_flags helper variable
metze
2012-08-01 14:17:16 +02:00
Stefan Metzmacher
0ec50e8a2f s3:libsmb: remove unused cli_state->user_session_key
metze
2012-08-01 14:17:15 +02:00
Stefan Metzmacher
c9eac1af14 s3:libsmb: make use of smb1cli_session_set_session_key()
metze
2012-08-01 14:17:12 +02:00
Stefan Metzmacher
20e4392b25 s3:libsmb: make use of cli_state_[g|s]et_tid()
metze
2012-07-24 18:44:04 +02:00
Volker Lendecke
93e950caf8 s3: Add cli_state->pw_nt_hash
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12 10:48:15 +02:00
Andrew Bartlett
01b726dbe8 s3-libsmb: Fix error messages to correctly mention PLAINTEXT not LM
Also make all the message say the same thing.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  6 10:17:55 CEST 2012 on sn-devel-104
2012-06-06 10:17:55 +02:00
Stefan Metzmacher
7ef4ae42fe s3:libsmb: change cli_sesssetup_blob_* to use uint8_t instead of char for inbuf
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
2b5d4d4267 s3:libsmb: use inhdr instead of inbuf in tree connect related functions
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
ae627a5da8 s3:libsmb: use inhdr instead of inbuf in session setup related functions
metze
2012-06-05 17:33:49 +02:00
Luk Claes
aea996dba6 s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_send
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun  3 23:37:02 CEST 2012 on sn-devel-104
2012-06-03 23:37:02 +02:00
Stefan Metzmacher
9c02667b82 s3:libsmb: use cli_tree_connect() instead of cli_tcon_andx()
cli_tree_connect() is more generic and uses what the server supports

metze
2012-05-30 10:24:57 +02:00
Stefan Metzmacher
bce43d75da s3:libsmb: fallback to SMBtcon for old servers
metze
2012-05-30 10:24:57 +02:00
Luk Claes
4688107800 s3:libsmb: get rid of cli_ucs2
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 16:58:03 CEST 2012 on sn-devel-104
2012-05-28 16:58:03 +02:00
Luk Claes
93ed99d6ff s3:libsmb: get rid of clisigning routines
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:51 +02:00
Luk Claes
f7f73c4dba s3:libsmb: get rid of cli_has_async_calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:50 +02:00