Stefan Metzmacher
2103c373b4
auth/gensec: remove tevent_context argument from gensec_update()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-27 00:36:32 +01:00
Stefan Metzmacher
a1e013505c
s3:rpc_client: avoid using dcerpc_binding internals in rpc_pipe_get_tcp_port()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
ded957614b
s3:rpc_client: use address "0.0.0.0" and port "135" for epmapper requests
...
Note: binding->host = NULL lets dcerpc_binding_build_tower()
use "0.0.0.0".
This matches Windows clients.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
aeab9602c0
s3:librpc/rpc: only propose header signing if we use sign or seal
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
dc561b7e2d
dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104
2014-01-16 18:21:40 +01:00
Stefan Metzmacher
c0761c3eae
s3:rpc_client: finally remove unused rpc_pipe_client->netlogon_creds
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:16 +01:00
Stefan Metzmacher
5adfc5f9f7
s3:rpc_client: use netlogon_creds_cli_auth_level() in cli_rpc_pipe_open_schannel_with_key()
...
This means the auth level is now based on the "winbindd sealed pipes" option,
defaulting to "yes" and DCERPC_AUTH_LEVEL_PRIVACY.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:07 +01:00
Stefan Metzmacher
38d4dba374
s3:rpc_client: make use of the new netlogon_creds_cli_context
...
This exchanges rpc_pipe_client->dc with rpc_pipe_client->netlogon_creds
and lets the secure channel session state be stored in node local database.
This is the proper fix for a large number of bugs:
https://bugzilla.samba.org/show_bug.cgi?id=6563
https://bugzilla.samba.org/show_bug.cgi?id=7944
https://bugzilla.samba.org/show_bug.cgi?id=7945
https://bugzilla.samba.org/show_bug.cgi?id=7568
https://bugzilla.samba.org/show_bug.cgi?id=8599
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:06 +01:00
Stefan Metzmacher
6ab9164c74
s3:rpc_client: send a dcerpc_sec_verification_trailer if needed
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 7 02:24:42 CET 2014 on sn-devel-104
2014-01-07 02:24:41 +01:00
Stefan Metzmacher
f0532fe0cd
s3:rpc_client: fill alloc_hint with the remaining data not the total data.
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:12 +01:00
Stefan Metzmacher
61bdbc23cd
s3:rpc_client: implement DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
f7bf7e705e
s3:rpc_client: handle DCERPC_AUTH_TYPE_SCHANNEL as any other gensec backend
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
4d3376e919
s3:rpc_client: add some const to rpc_api_pipe_req_send()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
946e29dbc1
s3:rpc_client: make rpc_api_pipe_req_send/recv static
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
5b39a351a8
s3:rpc_client: talloc_zero pipe_auth_data
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Jeremy Allison
a516ae6868
CVE-2013-4408:s3:Ensure we always check call_id when validating an RPC reply.
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-12-09 07:05:46 +01:00
Stefan Metzmacher
8b7c862bab
CVE-2013-4408:s3:rpc_client: verify frag_len at least contains the header size
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Gregor Beck
412af28e1e
s3:rpc_client: fix a leaked talloc_stackframe
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10241
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-04 10:38:50 +01:00
Stefan Metzmacher
872486bbd0
s3:rpc_client: pass object and table to rpccli_bh_create()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:45 +13:00
Stefan Metzmacher
f773ed2cf7
s3:rpc_client: implement dcerpc_binding_handle_auth_info()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:44 +13:00
Günther Deschner
a94e278883
s3-rpc: use table->name directly in DEBUG contexts.
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-20 13:07:10 +02:00
Günther Deschner
45949d7218
s3-rpc_cli: remove unused schannel calls from cli_pipe.c
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19 11:09:55 +02:00
Günther Deschner
89d0b89b5d
s3-rpc_cli: use gensec for schannel bind.
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19 11:09:36 +02:00
Günther Deschner
7b570b4128
s3-rpc_cli: allow to pass down a netlogon CredentialState struct to gensec.
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19 11:09:27 +02:00
Stefan Metzmacher
af4dc30684
s3:cli_pipe.c: return NO_USER_SESSION_KEY in cli_get_session_key() for schannel
...
SCHANNEL connections don't have a user session key,
they're like anonymous connections.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:58 +02:00
Stefan Metzmacher
838cb53962
s3:cli_pipe: pass down creds->computer_name to NL_AUTH_MESSAGE
...
We need to use the same computer_name value as in the netr_Authenticate3()
request.
We abuse cli->auth->user_name to pass the value down.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:57 +02:00
Stefan Metzmacher
e96142fc43
s3:cli_pipe: make use of netsec_create_state()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:57 +02:00
Stefan Metzmacher
3302356226
s3:rpc_client: remove netr_LogonGetCapabilities check from rpc_pipe_bind*
...
It's done in the caller now.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:55 +02:00
Stefan Metzmacher
eecb5bafba
s3:rpc_client: add netr_LogonGetCapabilities to cli_rpc_pipe_open_schannel_with_key()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:54 +02:00
Stefan Metzmacher
e9c8e3fb92
s3:rpc_client: use netlogon_creds_copy before rpc_pipe_bind
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:54 +02:00
Stefan Metzmacher
90e28c1825
s3:rpc_client: fix/add AES downgrade detection to rpc_pipe_bind_step_two_done()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:18:54 +02:00
Stefan Metzmacher
94be8d63cd
s3:rpc_client: rename same variables in cli_rpc_pipe_open_schannel_with_key()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:02 +02:00
Stefan Metzmacher
8a302fc353
s3:rpc_client: use the correct context for netlogon_creds_copy() in rpccli_schannel_bind_data()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:02 +02:00
Stefan Metzmacher
6ce645e03c
s3:rpc_client: make rpccli_schannel_bind_data() static
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:02 +02:00
Günther Deschner
c41b6e5c5e
s3-rpc_cli: pass down ndr_interface_table to rpc_transport_np_init().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
7bdcfcb37c
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp_port().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
0ff8c2d508
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_get_tcp_port().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
5c5cff0a72
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
8cd3a06051
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_np().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
34cc4b4095
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
9aa99c3cfb
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth_transport().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
9813fe2b04
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
3dc3a6c848
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel_with_key().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
9b4fb5b074
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_ncalrpc().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:29:59 +02:00
Volker Lendecke
e322420dc7
rpc_cli: Remove some unnecessary initializations
...
tevent_req_create already initializes "state" to 0
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Jul 8 17:04:20 CEST 2013 on sn-devel-104
2013-07-08 17:04:19 +02:00
Christian Ambach
3d29bb2d37
s3:rpc_client fix a crash
...
state->cli->dc does not have to be set (e.g. when running
net rpc join against an older Samba PDC), so check it before dereferencing it
This fixes Bug 9669 - net rpc join crashes against a Samba 3.0.33 PDC
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9669
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Feb 20 19:00:52 CET 2013 on sn-devel-104
2013-02-20 19:00:52 +01:00
Stefan Metzmacher
f9d0473d02
s3:rpc_client: 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:52 +01:00
Stefan Metzmacher
b538c31889
s3:rpc_client: 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:49 +01:00
Günther Deschner
b11ba24883
s3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() (bug #9426 )
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Nov 26 17:36:20 CET 2012 on sn-devel-104
2012-11-26 17:36:19 +01:00
Günther Deschner
2032f2746d
s3-rpc_client: lookup nametype 0x20 in rpc_pipe_open_tcp_port(). (bug #9426 )
...
The server name type (0x20) is much more likely to be available in the name cache, as
this type gets stored by winbind itself - the primary user of the ncacn_ip_tcp
code currently.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov 23 16:30:57 CET 2012 on sn-devel-104
2012-11-23 16:30:56 +01:00