1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

315 Commits

Author SHA1 Message Date
Jeremy Allison
03841f9e44 Fix bug #7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid NetBIOS session request is received the code in name_len() in
libsmb/nmblib.c can hit an assert.

Re-write name_len() and name_extract() to use "buf/len" pairs and
always limit reads.

Jeremy.
2010-09-26 03:01:03 -07:00
Jeremy Allison
d8814b1a48 Fix bug 7694 - Crash bug with invalid SPNEGO token.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid SPNEGO packet contains no OIDs we crash in the SMB1/SMB2 server
as we indirect the first returned value OIDs[0], which is returned as NULL.

Jeremy.
2010-09-23 21:44:24 -07:00
Günther Deschner
c7fe04abc7 s3-build: only include async headers where needed.
Guenther
2010-09-20 13:54:42 -07:00
Sumit Bose
e2d6b64219 Fix array size of a memmber of struct cli_ulogoff_state
The too small array makes UID-REGRESSION-FIX fail on 32bit
architectures.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-17 11:51:56 +02:00
Jeremy Allison
718fd39f10 Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder@gmx.net>".
Jeremy.
2010-09-09 15:29:03 -07:00
Günther Deschner
ca765d2f50 s3-build: only include krb5 environment variables where required.
Guenther
2010-08-26 00:20:29 +02:00
Volker Lendecke
6cb5a0d097 s3: Remove some pointless wrapper functions 2010-08-05 13:57:31 +02:00
Andreas Schneider
ce2a086119 s3-popt: Only include popt-common.h when needed. 2010-08-05 12:08:31 +02:00
Günther Deschner
e7a6a3ec0d s3: avoid global include of ads.h.
Guenther
2010-08-05 00:32:02 +02:00
Jeremy Allison
5002b3a90d Add approriate TALLOC_CTX's thoughout the spnego code. No more implicit NULL contexts.
Jeremy.
2010-07-20 16:17:58 -07:00
Jeremy Allison
cce19c5162 Fix one more data_blob -> data_blob_talloc. Move away from implicit NULL context tallocs.
Jeremy.
2010-07-20 14:59:31 -07:00
Jeremy Allison
4ed9437b7e Add TALLOC_CTX argument to spnego_parse_negTokenInit, reduce
use of malloc, and data_blob().

Jeremy.
2010-07-20 13:35:43 -07:00
Jeremy Allison
7d17bfcf51 Rename spnego_gen_negTokenTarg() -> spnego_gen_krb5_negTokenInit()
as this correctly describes what this function does.

Jeremy.
2010-07-20 11:14:49 -07:00
Jeremy Allison
0bb8d133c9 Remove gen_negTokenInit() - change all callers to spnego_gen_negTokenInit().
We now have one function to do this in all calling code. More rationalization
to follow.

Jeremy.
2010-07-19 17:14:26 -07:00
Jeremy Allison
625a511389 Remove parse_negTokenTarg(), as it's actually incorrect. We're processing
negTokenInit's here. Use common code in spnego_parse_negTokenInit().

Jeremy.
2010-07-19 15:41:45 -07:00
Simo Sorce
cdcdaaa6dd s3-ntlmssp: Remove ntlmssp_end and let the talloc hierarchy handle it.
All the members are children of ntlmssp_state anyway.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 14:19:47 +10:00
Andrew Bartlett
ebae21f023 ntlmssp: Make the ntlmssp.h from source3/ a common header
The code is not yet in common, but I hope to fix that soon.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:56 +02:00
Stefan Metzmacher
7d977da925 s3:ntlmssp: pass names and use_ntlmv2 to ntlmssp_client_start() and store them
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:55 +01:00
Stefan Metzmacher
55279dfbe3 s3:ntlmssp: remove server_name from ntlmssp_state and fill the server.* fields also for the client
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:55 +01:00
Volker Lendecke
fdd82e69ab s3: Explicitly handle inbuf in cli_negprot_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
160c459b54 s3: Explicitly handle inbuf in cli_tcon_andx_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
036fcafe24 s3: Explicitly handle inbuf in cli_sesssetup_blob_done 2010-02-22 23:23:18 +01:00
Volker Lendecke
47c61b4f15 s3: Explicitly handle inbuf in cli_session_setup_guest_done 2010-02-22 23:23:18 +01:00
Volker Lendecke
d122bfc064 s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
Jeremy Allison
687e4eba3c Fix bug #7079 - cliconnect gets realm wrong with trusted domains.
Passing NULL as dest_realm for cli_session_setup_spnego() was
always using our own realm (as for a NetBIOS name). Change this
to look for the mapped realm using krb5_get_host_realm() if
the destination machine name is a DNS name (contains a '.').
Could get fancier with DNS name detection (length, etc.) but
this will do for now.

Jeremy.
2010-01-30 19:24:28 -08:00
Volker Lendecke
ca48d6ab77 s3: Add CLI_FULL_CONNECTION_USE_CCACHE 2010-01-24 20:32:17 +01:00
Volker Lendecke
a03a83ad26 s3: Add ccache use to cli_session_setup_ntlmssp 2010-01-24 20:32:17 +01:00
Tim Prouty
34f0cff066 s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with security=share 2010-01-07 15:32:27 -08:00
Volker Lendecke
37ac16a88f s3: Convert cli_ulogoff to the async API 2010-01-03 21:14:57 +01:00
Volker Lendecke
99f292479f s3: Convert cli_tdis to the async API 2010-01-03 21:14:57 +01:00
Volker Lendecke
e2f361d05e s3: Fix some nonempty blank lines 2010-01-03 11:38:22 +01:00
Volker Lendecke
6edfbbd79b s3: Remove some unused code 2010-01-03 11:38:22 +01:00
Volker Lendecke
2d75aa04da s3: Convert cli_sesssetup_ntlmssp to the async API 2010-01-03 11:38:22 +01:00
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