1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

319 Commits

Author SHA1 Message Date
Simo Sorce
76f249fb44 s3-dcerps: check auth_type
make sure the auth type used throught the auth operation is consistent.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:25 -07:00
Simo Sorce
b11fff1f48 s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an
accessor function to free data anymore.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
3453bc7b11 s3-dcerpc: make auth context opaque
This way we always double check in advance that the context
is of the right type with talloc_get_type_abort instead of
potentially accessing random memory by addressing the wrong
structure in the union.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
0ec3720573 srv_pipe: reorganize code so that related functions are close to each other
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
d10e192b83 s3-dcerpc: finally remove the legaqcy spnego_type variable from pipe_auth_data
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
b475cfd0b2 s3-dcerpc: use new spnego server code
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
62d7226b78 s3-dcesrv: use gssapi helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
8efd31ccad s3-dcesrv: use ntlmssp helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:46 -07:00
Simo Sorce
4194383cfe gssapi: remove unused function argument
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
412ebad02b gssapi: avoid explicit dependency on dcerpc specific structures
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
0e5eb82a6f s3-dcerpc: move crypto stuff in /librpc/crypto
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
2a2557075e s3-dcerpc: Implement DCERPC_AUTH_TYPE_KRB5 server side
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:35:02 +02:00
Günther Deschner
7b6fc9f414 s3-dcerpc: only include rpc_dce.h where needed.
Guenther
2010-08-26 00:20:29 +02:00
Simo Sorce
9b8c7d47f9 s3-dcerpc: Remove unused function 2010-08-17 06:33:13 -04:00
Simo Sorce
7b12513d12 s3-dcerpc: make a few local functions as static 2010-08-17 06:33:13 -04:00
Stefan Metzmacher
cc6951243d s3:rpc_server: fix valgrind warning
metze
2010-08-08 11:05:17 +02:00
Günther Deschner
64b26affe0 s3-dcerpc: fix some uninitialized variables build warnings.
Guenther
2010-08-03 15:57:56 +02:00
Simo Sorce
57bd974e58 s3-dcerpc: Use dcerpc_guess_sizes in the server code too. 2010-07-30 14:55:28 -04:00
Simo Sorce
3469fbc5e4 s3-dcerpc: rationalize packet creation in the server code
Move all related functions into create_next_packet, but make it transport
neutral (not pass in pipse_struct)
2010-07-30 14:55:27 -04:00
Simo Sorce
2463a87177 s3-dcerpc: Use dcerpc_AuthType in pipe_auth_data 2010-07-28 12:19:32 -04:00
Simo Sorce
bfe53d4145 s3-dcerpc: Set flags directly instead of calling unimplemented functions. 2010-07-28 12:18:19 -04:00
Simo Sorce
9565e3f6a7 s3-dcerpc: Make dcerpc_check_auth() common code 2010-07-28 12:17:41 -04:00
Simo Sorce
5f2cca6b2a s3-dcerpc: Add the same paranoia checks we have in the client code 2010-07-28 12:17:18 -04:00
Simo Sorce
49a8c2965d s3-dcerpc: Split auth checking into a generic function. 2010-07-28 12:16:58 -04:00
Simo Sorce
1fc71c9c6f s3-dcerpc do not pass pipes_struct to dcesrv_auth_request() 2010-07-28 12:16:29 -04:00
Simo Sorce
2ce169ce18 s3-dcerpc: Make dcesrv_auth_request() return NTSTATUS codes 2010-07-28 12:16:08 -04:00
Simo Sorce
aa4c5a2bfb s3-dcerpc: Use the common dcerpc_add_auth_footer() in the server code 2010-07-28 12:15:45 -04:00
Andreas Schneider
667d43d4c8 s3-rpc_pipe: Use struct pipes_struct. 2010-07-28 10:39:24 +02:00
Simo Sorce
61cfbf342f s3-rpc_server: Cleanup the way we free pipe auth data 2010-07-21 19:14:59 -04:00
Simo Sorce
3b502d899d s3-dcerpc: Fix potential memleak
Use a free function for schannel data too for now.
2010-07-21 19:13:27 -04:00
Simo Sorce
a3713d7469 s3-dcerpc: Properly initialize output buffers on nak/fault 2010-07-21 19:12:59 -04: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
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
Simo Sorce
e958b39042 s3-auth: Move auth_ntlmssp wrappers in their own file
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-20 15:52:31 +10:00
Simo Sorce
a04bbd281c s3-auth: Refactor and rename auth_ntlmssp_server_info()
Rename it to auth_ntlmssp_steal_server_info() to make it clear that
the server_info struct is stolen from the auth_ntlmssp_state structure.
Use talloc_move instead of manual steal&clear
Add comments to explain what is going on.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-20 15:52:24 +10: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
c09dcb903c s3-auth: Use talloc hierarchies to properly free auth_ntlmssp_state contexts
Turn auth_ntlmssp_end into a destructor and attach it to auth_ntlmssp_state.
Remote auth_ntlmssp_end and use TALLOC_FREE in the callers.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 14:20:04 +10:00
Simo Sorce
52f6bfea4b s3-dcerpc: Move mere processing functions from srv_pipe_hnd.c to srv_pipe.c 2010-07-17 15:37:24 -04:00
Günther Deschner
c5e85a4987 s3-dcerpc: rename SCHANNEL_SIG_SIZE to NL_AUTH_SIGNATURE_SIZE and move to IDL.
Guenther
2010-07-16 23:09:54 +02:00
Simo Sorce
65116adceb s3-dcerpc: Fix ability to receive Big Endian PDUs 2010-07-16 16:02:39 -04:00
Simo Sorce
53945a2e99 s3-dcerpc: Use a local function to dump pdu regions
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
100d37fc46 s3-dcerpc: Use DATA_BLOB for pipes_struct input data
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
79c207ed62 s3-dceprc: Use IDL defined constants for length calculations
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:17 +02:00
Simo Sorce
ca3bdca52e s3-dcerpc: Padding is never done on a DCERPC_PKT_BIND_ACK packet.
Empirically verified against Windows.
It never pads the auth credentials on this packet type.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:17 +02:00
Simo Sorce
2452a7a4c1 s3-dcerpc: consolidate respones packet creation code
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
8cd3912afa s3-dcerpc: Convert frag from prs_struct to a simple DATA_BLOB
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
31b59bbf99 s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
8ffac961db s3-dcerpc: Stop using hand marshalling in create_next_pdu_noauth()
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
a678d4e3b4 s3-dcerpc: Stop using hand marshalling in create_next_pdu_schannel()
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00
Simo Sorce
5918a6c751 s3-dcerpc: Stop using hand marshalling in create_next_pdu_ntlmssp()
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:16 +02:00