Stefan Metzmacher
1334ed723e
s3:libsmb/cliconnect: make use of ntlmssp_is_anonymous()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr 17 16:16:51 CEST 2012 on sn-devel-104
2012-04-17 16:16:51 +02:00
Stefan Metzmacher
66d7553b0e
s3:libsmb: fix anonymous session setups against windows servers
...
Windows server doesn't set the SMB2_SESSION_FLAG_IS_GUEST nor
SMB2_SESSION_FLAG_IS_NULL flag.
This fix makes sure we don't try to verify a signature on the
final session setup response.
metze
2012-04-16 12:54:54 +02:00
Michael Adam
727f3ee6ac
s3:libsmb:smb2: pass previous session ID to session setup, not previous session
...
We only need the session, and under some circumstances, it might complicate
things for the caller to have to cope with the whole structure (talloc...).
2012-02-28 00:08:52 +01:00
Stefan Metzmacher
aa4331be9e
libcli/smb/smbXcli: maintain smb2 channel_signing_key separate from the signing_key
...
The signing_key is fix across all channels and is used for session setups
on a channel binding.
Note:
- the last session setup response is signed with the new channel signing key.
- the reauth session setups are signed with the channel signing key.
It's also not needed to remember the main session key.
metze
2012-02-27 12:51:33 +01:00
Andreas Schneider
8080dbad78
s3-lib: Fix util_cmdline which doesn't use popt.
...
This creates its own header file for util_cmdline so it doesn't need to
link against popt.
This should fix linking on FreeBSD.
2012-02-01 21:54:21 +01:00
Andrew Bartlett
860ad734ba
s3-libads Factor out a new routine kerberos_get_principal_from_service_hostname()
...
This is now used in the GSE GSSAPI client, so that when we connect to
a target server at the CIFS level, we use the same name to connect
at the DCE/RPC level.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Volker Lendecke
75d3b9ce08
s3: Fix some False/NULL hickups
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-12-20 13:13:17 +01:00
Stefan Metzmacher
665593d6ac
s3:libsmb: add cli_tree_connect() for a generic tree connect
...
metze
2011-11-24 19:02:32 +01:00
Stefan Metzmacher
8a9bfd61b7
s3:libsmb: add SMB2 support to cli_session_setup()
...
metze
2011-11-24 19:02:32 +01:00
Stefan Metzmacher
9ebdee2817
s3:libsmb: implement cli_state based functions on top of smbXcli_conn/smbXcli_req
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
b895f1fb01
s3:libsmb: close fd on error in cli_connect_nb()
...
metze
2011-11-21 18:03:07 +01:00
Stefan Metzmacher
949f12d592
Revert "Fix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects"
...
This reverts commit f261ac1932
.
We now handle that in cli_state_create().
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 16 15:44:05 CET 2011 on sn-devel-104
2011-11-16 15:44:05 +01:00
Stefan Metzmacher
0fb4991116
s3:libsmb: correctly parse the LANMAN2.1 negprot response from OS/2 (bug #8584 )
...
metze
2011-11-08 15:24:51 +01:00
Stefan Metzmacher
9a3fe3a329
s3:libsmb: key_len is 8bit only in the NT1 case
...
metze
2011-11-08 15:24:51 +01:00
Stefan Metzmacher
e99017af72
s3:libsmb: also remember the optional server name from the negprot response
...
W2K (at least sp4) and higher also send the server name.
metze
2011-11-04 14:16:29 +01:00
Stefan Metzmacher
aea76a3aaa
s3:libsmb: the workgroup in the non-extended-security negprot is not aligned ( #8573 )
...
I've tested the fix against NT4 sp6a, W2K sp4, W2K8R2 and Win8pre0.
metze
2011-11-04 14:16:28 +01:00
Stefan Metzmacher
1b04e54b57
s3:libsmb: s/Undefined/SMB_SIGNING_DEFAULT/
...
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
7ebd4337ac
libcli/smb: move source3/libsmb/read_smb.* to the toplevel
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 10:18:06 CEST 2011 on sn-devel-104
2011-10-24 10:18:06 +02:00
Andrew Bartlett
0c6e4adcb2
ntlmssp: Move ntlmssp code to auth/ntlmssp
...
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Jeremy Allison
acc28706b5
Fix const warning.
2011-10-14 13:20:07 -07:00
Gregor Beck
85b145d745
s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Stefan Metzmacher
e8ed54d6c9
s3:libsmb: remove unused TALLOC_FREE(subreq) calls in
...
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 28 02:01:09 CEST 2011 on sn-devel-104
2011-09-28 02:01:08 +02:00
Stefan Metzmacher
889886c212
s3:libsmb: call TALLOC_FREE(subreq) directly after cli_sesssetup_blob_recv()
...
cli_sesssetup_blob_recv() talloc moves stuff that's needed on
the given memory context.
metze
2011-09-28 00:24:43 +02:00
Volker Lendecke
585294e4db
s3: Fix Coverity ID 2619: UNINIT
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Sep 22 01:55:04 CEST 2011 on sn-devel-104
2011-09-22 01:55:04 +02:00
Volker Lendecke
25e0e675e8
s3: Fix Coverity ID 2618: UNINIT
2011-09-22 00:24:10 +02:00
Stefan Metzmacher
ef8dc2d30e
s3:libsmb: move cli->server{zone,time} to cli->conn.smb1.server.{time_zone,system_time}
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 15 14:00:29 CEST 2011 on sn-devel-104
2011-09-15 14:00:26 +02:00
Stefan Metzmacher
aca5e33b00
s3:libsmb: split cli->secblob into cli->conn.smb1.server.{guid,gss_blob,challenge,workgroup}
...
metze
2011-09-15 12:12:28 +02:00
Stefan Metzmacher
bc72a9c169
s3:libsmb: make use of cli_state_server_gss_blob()
...
metze
2011-09-15 12:12:27 +02:00
Stefan Metzmacher
1f6060a3c1
s3:libsmb: make use of cli_state_server_challenge()
...
metze
2011-09-15 12:12:27 +02:00
Stefan Metzmacher
a1e2affd0f
s3:libsmb: remove the guid from the cli->secblob in spnego mode
...
metze
2011-09-15 12:12:26 +02:00
Stefan Metzmacher
4a79d213c2
s3:libsmb: make sure cli->secblob.length is 8 if we get a challenge
...
metze
2011-09-15 12:12:26 +02:00
Stefan Metzmacher
18bec89b90
s3:libsmb: restructure cli_negprot_done() secblob handling a bit
...
metze
2011-09-15 12:12:26 +02:00
Stefan Metzmacher
dcf54977d7
s3:libsmb: move cli->sesskey to cli->conn.smb1.server.session_key
...
metze
2011-09-15 12:12:25 +02:00
Stefan Metzmacher
abca5f17c3
s3:libsmb: detect lock_read and write_unlock support
...
metze
2011-09-15 12:12:25 +02:00
Stefan Metzmacher
14e8ef14a0
s3:libsmb: move cli->*braw_supported to cli->conn.smb1.server.*braw
...
This is currently unused, but we might use it in future.
metze
2011-09-15 12:12:25 +02:00
Stefan Metzmacher
596aa96d17
s3:libsmb: move cli->sec_mode to cli->conn.smb1.server.security_mode
...
metze
2011-09-15 12:12:24 +02:00
Stefan Metzmacher
8f44105cc4
s3:libsmb: move cli->max_mux to cli->conn.smb1.server.max_mux
...
metze
2011-09-15 12:12:24 +02:00
Stefan Metzmacher
768581eee5
s3:libsmb: move cli->max_xmit to cli->conn.smb1.max_xmit
...
And keep cli->conn.smb1.client.max_xmit and
cli->conn.smb1.server.max_xmit.
metze
2011-09-15 12:12:24 +02:00
Stefan Metzmacher
595f0020d4
s3:libsmb: move cli->capabilities to cli->conn.smb1.capabilities
...
And keep cli->conn.smb1.client.capabilities and
cli->conn.smb1.server_capabilities.
metze
2011-09-15 12:12:23 +02:00
Stefan Metzmacher
74a581afe5
s3:libsmb: move cli->protocol to cli->conn.protocol
...
metze
2011-09-15 12:12:22 +02:00
Stefan Metzmacher
3f00cce9b3
s3:libsmb: pass max_protocol to cli_negprot()
...
metze
2011-09-15 10:25:17 +02:00
Stefan Metzmacher
4f7be46d99
s3:libsmb: add basic max_protocol support in cli_negprot()
...
metze
2011-09-15 10:25:17 +02:00
Stefan Metzmacher
7f40b606c4
s3:libsmb: use local variables in cli_state_create()
...
We don't need to keep use_spnego, use_level_II_oplocks, force_dos_errors
and force_ascii within struct cli_state.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 15 10:12:17 CEST 2011 on sn-devel-104
2011-09-15 10:12:17 +02:00
Stefan Metzmacher
dd836aac9d
s3:libsmb: make use of SMB_CAP_BOTH/CLIENT_MASK in cli_session_setup_capabilities()
...
This matches a w2k3 client.
metze
2011-09-15 08:33:13 +02:00
Stefan Metzmacher
1d8bdab1c4
s3:libsmb: calculate the negotiated SMB1 capabilities in cli_negprot_done()
...
We calculate the negotiated capabilities based on the mask for:
- client only flags
- flags used in both directions
- server only flags
metze
2011-09-15 08:33:13 +02:00
Stefan Metzmacher
3162d86528
s3:libsmb: no need to reset capabilities in cli_session_setup_lanman2()
...
This is only used cli->protocol < PROTOCOL_NT1, in which case
cli_negprot_done() has already reset cli->capabilities.
metze
2011-09-15 08:33:12 +02:00
Stefan Metzmacher
d87ef021ab
s3:libsmb: make sure we always set cli->capabilities at the end of cli_negprot_done()
...
If the server doesn't support PROTOCOL_NT1 we should reset the negotiated
capabilities to 0.
metze
2011-09-15 08:33:11 +02:00
Stefan Metzmacher
ff52be06e5
s3:libsmb: remove unused cli->is_samba
...
s3:libsmb: remove unused cli->is_samba
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-09-14 13:12:52 -07:00
Jeremy Allison
f261ac1932
Fix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects
...
Ensure we have valid pointers.
2011-09-14 11:59:22 -07:00
Stefan Metzmacher
c682472fdf
s3:libsmb: make use of new advanded SMB signing
...
metze
2011-09-14 08:09:15 +02:00