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

282 Commits

Author SHA1 Message Date
Volker Lendecke
a321dd91a4 s3: Convert cli_session_setup_kerberos to the async API
This is still cheated, acquiring the ticket is not async yet, but the SMB
part is
2010-01-03 11:38:22 +01:00
Andrew Bartlett
802e9328ed s3:ntlmssp: only include ntlmssp.h where actually needed
Andrew Bartlett
2009-12-22 21:07:53 +01:00
Volker Lendecke
1b5389ab23 s3: Fix an error case in cli_negprot 2009-12-20 23:30:43 +01:00
Günther Deschner
04f8c229de s3-kerberos: only use krb5 headers where required.
This seems to be the only way to deal with mixed heimdal/MIT setups during
merged build.

Guenther
2009-11-27 16:36:00 +01:00
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Volker Lendecke
5c54e4c103 s3:libsmb: Attempt to fix bug 6665
Before the async libsmb rewrites, we sent tid==0 on negprot. With the rewrite,
we send 0xffff. This *should* not matter, but this is one difference in the
sniffs I see.
2009-09-03 09:23:57 +02:00
Steven Danneman
bc4b253b2c s3/debug: make SPENGO OID list appear under one debug header 2009-08-26 16:34:09 -07:00
Jeremy Allison
cdb765a76c Fix bug #6419 - smbclient -L 127.0.0.1" displays "netbios name" instead of "workgroup"
Unify the handling of the sessionsetup parsing so we don't get different
results when parsing a guest reply than an ntlmssp reply.
Jeremy.
2009-06-01 14:38:56 -07:00
Bo Yang
05379f0125 s3: return proper error code in cli_smb_req_send
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13 18:47:00 +08:00
Jeremy Allison
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
Volker Lendecke
d52b0a25ad Make cli_tcon_andx chainable 2009-05-07 16:37:54 +02:00
Volker Lendecke
b35967edba Make cli_session_setup_guest chainable 2009-05-07 16:37:54 +02:00
Andrew Bartlett
6c9caed481 Merge commit 'origin/master' into libcli-auth-merge-without-netlogond 2009-04-20 16:53:02 +02:00
Jeremy Allison
265829c32f When doing a cli_ulogoff don't invalidate the cnum, invalidate the vuid.
Jeremy.
2009-04-16 15:16:28 -07:00
Andrew Bartlett
27815a71a9 More work to adapt to merged libcli/auth function prototypes 2009-04-14 16:23:42 +10:00
Volker Lendecke
3084d49cc0 Add a bad hack to enable level 2 oplocks in torture_open_connection_share 2009-04-06 21:32:08 +02:00
Volker Lendecke
807328ce6d Convert cli_tcon_andx to tevent_req 2009-04-06 21:32:07 +02:00
Volker Lendecke
03becb5066 Convert cli_negprot to tevent_req 2009-04-06 21:32:06 +02:00
Volker Lendecke
95c792b6af Convert cli_session_setup_guest to tevent_req 2009-04-06 21:32:06 +02:00
Stefan Metzmacher
6af15943c6 s3:libsmb: use new simplified smb_signing code for the client side
We store the seqnum/mid mapping in the cli_request structure
for async requests and in the cli_state structure for sync calls.

We skip the signing check for oplock requests while waiting
for async requests coming in.

metze
2009-03-23 12:21:14 +01:00
Volker Lendecke
298bff5019 Fix connect to port 139 only -- thanks gd for bugging me :-) 2009-03-23 12:06:57 +01:00
Volker Lendecke
20cee26a3d Convert open_socket_out_defer to tevent_req 2009-03-16 19:32:01 +01:00
Jeremy Allison
f48a345e4a Remove pwd_cache.c, it was doing nothing. Make user_name, domain, and
password talloc'ed strings within the cli_struct.
Jeremy.
2009-03-13 17:49:24 -07:00
Volker Lendecke
e58ade4136 Fix a smbclient segfault against security=share servers 2009-03-07 15:27:13 +01:00
Stefan Metzmacher
6e572d40a9 s3:libsmb: remove cli_setup_signing_state() and add struct cli_state *cli_initialise_ex()
This prepares the next changes.

metze
2009-03-06 16:37:21 +01:00
Stefan Metzmacher
918e6288fa s3:libsmb: smb signing works the same for extented and non-extended security
This is only cosmetic, but it makes it easier to understand.

metze
2009-03-06 16:18:50 +01:00
Volker Lendecke
dbc79381a8 Convert name_mangle() to use talloc 2009-02-24 20:40:46 +01:00
Volker Lendecke
7ecaced886 Do not use strlen if not necessary... :-) 2009-02-10 21:55:13 +01:00
Volker Lendecke
810b670b75 Fix Coverity ID 870 2009-02-03 10:22:36 +01:00
Volker Lendecke
c14b7e648b Split up async_req into a generic and a NTSTATUS specific part 2009-02-01 19:05:39 +01:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Volker Lendecke
7b934c6af3 Make cli_session_setup_guest async 2009-01-30 12:47:59 +01:00
Volker Lendecke
37da26a06e Add the strlen to push to smb_bytes_push_str, return the converted size
The pushed strlen replaces the STR_TERMINATE flag which I personally always
find very confusing.
2009-01-29 21:38:06 +01:00
Volker Lendecke
7f25e0da73 Decouple clistr_pull from struct cli_state->inbuf 2009-01-26 05:39:34 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
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
2009-01-15 22:56:01 +01:00
Jeremy Allison
907f085296 Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Stefan Metzmacher
7d9fd64f38 s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases
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
2009-01-12 13:22:40 +01:00
Volker Lendecke
b4f8996ac7 Simulate the Windows behaviour to fire 445 and after a timeout 139 2009-01-04 16:42:41 +01:00
Volker Lendecke
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
Volker Lendecke
4abdd3981e Pass "bytes_alignment" up through cli_request_send
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19 14:53:29 +01:00
Volker Lendecke
f87da49830 Make cli_negprot async 2008-12-19 10:50:52 +01:00
Volker Lendecke
bb8ca0fdbf Make cli_negprot return NTSTATUS instead of bool 2008-12-19 10:28:30 +01:00
Volker Lendecke
96a3d7be31 cli_negprot_send -> cli_negprot_sendsync 2008-12-19 10:28:20 +01:00
Volker Lendecke
be3d999063 Remove a pointless static variable
Every sane compiler will only allocate "*SMBSERVER" once
2008-12-13 19:21:48 +01:00
Volker Lendecke
b04d00744e Micro-Optimize cliconnect.c
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 :-)
2008-12-13 19:19:45 +01:00
Volker Lendecke
691cf386fb Slightly simplify cli_session_setup_ntlmssp
Remove three pointless variables
2008-12-07 21:30:35 +01:00
Tim Prouty
1eb743ab8e s3: Change sockaddr util function names for consistency
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Volker Lendecke
95873566e3 Do not build the session request if it si not used anyway 2008-11-30 12:31:04 +01:00
Volker Lendecke
88909acb6c fix nonempty blank lines 2008-11-30 12:30:51 +01:00