1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

939 Commits

Author SHA1 Message Date
Gregor Beck
9832eb6bbf s4:librpc: factor out xxx_shutdown_pipe() to dcerpc_shutdown_pipe()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
30ca477c71 s4:librpc: factor out xxx_dead() to dcerpc_transport_dead()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
3193c27256 s4:librpc: remove server_name from transport
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
383ba3dacf s4:librpc: make 'struct dcerpc_pipe_connect' private
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
27d0d32105 s4:librpc: remove unused dcerpc_smb2.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
a9bb84c4b0 s4:librpc: implement dcerpc_pipe_open_smb2() in dcerpc_smb.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
7352f7f91d s4:librpc: make use of dcerpc_pipe_open_smb_send/recv for SMB2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
45fc961932 s4:librpc: pass dcecli_connection instead of dcerpc_pipe to dcerpc_secondary_smb_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
bebc05a973 s4:librpc: use dcerpc_binding_dup() instead of talloc_reference()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
a08ee93a2f s4:librpc: pass smbXcli_{conn,session,tcon} to dcerpc_pipe_open_smb_send()
This will allow it to be used also for smb2 later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
f7b1ff2cf4 s4:librpc: don't talloc_reference smbcli_tree
It's the job of the caller to make sure it stays for the
whole lifetime of the connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Stefan Metzmacher
e6474ba2c2 s4:librpc: keep smbcli_tree/smb2_tree as talloc child of dcecli_connection
This will avoid the need of talloc_reference later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Gregor Beck
d230f73e97 s4:librpc: use tstream_smbXcli_np in dcerpc_smb.c
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Gregor Beck
2ec65ea1e7 s4:librpc: use tstream in dcerpc_sock.c
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Stefan Metzmacher
01ea63e1a1 s4:librpc: make it possible for the transport to specify the max_xmit/recv_size
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:42 +01:00
Stefan Metzmacher
d821661484 s4:librpc/rpc: update alloc_hint for each fragment
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
ce84ade56c s4:librpc/rpc: remove unused rpc_request->ndr structure
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
a0f781cca4 s4:librpc: fix memory leaks in dcerpc_request_recv_data()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
b61f71730f s4:librpc: fix memory leak in ncacn_pull()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
4cc3388c03 s4:pyrpc: fix talloc hierachie in dcerpc_InterfaceObject
The tevent_context is cached under the connection,
so we need to make sure it stays arround as long as the connection.

Otherwise it will segfault while dereferencing the tevent_context
on deallocation if a secondary connection is arround.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:34 +01:00
Stefan Metzmacher
7db1dc13b0 s4:librpc: always try to negotiate DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
If the gensec backend supports it there's no reason not sign the header.

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
127de4f4ac CVE-2013-4408:s4:dcerpc_sock: check for invalid frag_len within sock_complete_packet()
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
Stefan Metzmacher
77c3518152 CVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()
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
Stefan Metzmacher
3be7907fd9 CVE-2013-4408:s4:dcerpc_smb: check for invalid frag_len in send_read_request_continue()
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
Stefan Metzmacher
db5fff3bc9 CVE-2013-4408:s4:dcerpc: check for invalid frag_len in ncacn_pull()
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
Stefan Metzmacher
a62927ef88 s4:librpc: let dcerpc_schannel_key_recv() return netlogon_creds_CredentialState
cli_credentials_set_netlogon_creds() should only be used directly before
a DCERPC bind in order to pass the session information to the
gensec layer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:49:00 +13:00
Stefan Metzmacher
300a186a71 s4:librpc: make dcerpc_schannel_key_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:49:00 +13:00
Stefan Metzmacher
d610339028 s4:librpc/rpc: remove unused dcerpc_smb_tree()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:55 +13:00
Stefan Metzmacher
e9998d1668 s4:librpc/rpc: make use of dcerpc_secondary_smb_send/recv() in dcerpc_secondary_context()
This avoids the use of dcerpc_smb_tree(), which is a layer violation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:54 +13:00
Stefan Metzmacher
07ec60ce72 s4:librpc/rpc: add dcerpc_secondary_smb_send/recv()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:54 +13:00
Stefan Metzmacher
ecb3150587 s4:librpc/rpc: remove unused dcerpc_smb_fnum()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:53 +13:00
Stefan Metzmacher
d052528974 s4:librpc: 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
Stefan Metzmacher
ae6166a3c1 s4:librpc: avoid talloc_reference() in dcerpc_epm_map_binding_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12 16:48:46 +12:00
Stefan Metzmacher
34fa794699 s4:librpc: fix netlogon connections against servers without AES support
LogonGetCapabilities() only works on the credential chain if
the server supports AES, so we need to work on a temporary copy
until we know the server replied a valid return authenticator.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:01 +02:00
Günther Deschner
a9d5b2fdf0 libcli/auth: also set secure channel type in netlogon_creds_client_init().
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
Bill Parker
9b58da9866 Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().
In reviewing various files in Samba-4.0.7, I found a number
of instances where malloc()/calloc() were called without the
checking the return value for a value of NULL, which would
indicate failure.

(NB. The changes needed to ccan, iniparser, popt and heimdal
will be reported upstream, not patched inside Samba).

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Source <idra@samba.org>
2013-07-17 16:12:19 -07:00
Andreas Schneider
7937a6afcb s4-librpc: Remove dead code in smb_send_request().
If trigger_read we return earlier.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:00 +01:00
Andrew Tridgell
b0cc0d5698 s4-librpc: set error code to LOGON_FAILURE on RPC fault with access denied
this allows the client code to trigger a retry with a new password
callback for NTLM connections

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:41 +11:00
Andrew Tridgell
5d6ae3498a s4-librpc: try a 2nd logon for more error cases
not all servers give LOGON_FAILURE on authentication failures, so we
need to do the retry with a new ticket on a wider range of error types

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:41 +11:00
Andrew Tridgell
ed2e69fe91 s4-librpc: use cli_credentials_failed_kerberos_login to cope with stale tickets
This allows our RPC client code to cope with a kerberos server
changing password while we have a valid service ticket

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:40 +11:00
Stefan Metzmacher
89a5a71654 s4:librpc/rpc: don't do async requests if gensec doesn't support async replies (bug #9097)
metze
2012-08-25 01:39:41 +02:00
Stefan Metzmacher
0bd0ad967d s4:librpc/rpc: also call dcerpc_schedule_io_trigger() after bind and alter_context responses
metze
2012-08-25 01:39:41 +02:00
Stefan Metzmacher
e44b5bdb2c s4:librpc/rpc: use dcerpc_req_dequeue() in dcerpc_request_recv_data()
metze
2012-08-25 01:39:41 +02:00
Stefan Metzmacher
81bc57d395 s4:librpc/rpc: use talloc_zero for 'struct rpc_request'
metze
2012-08-25 01:39:41 +02:00
Volker Lendecke
5251d07e62 s4: Fix returns in py_check_dcerpc_type
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-17 00:57:19 +02:00
Stefan Metzmacher
7977d90f1e s4:librpc/dcerpc_smb2: sync smb2_session_key() with smb_session_key()
metze
2012-08-01 14:17:14 +02:00
Stefan Metzmacher
286e249737 s4:librpc/dcerpc_smb: make use of smbXcli_session_application_key()
metze
2012-08-01 14:17:13 +02:00
Stefan Metzmacher
803fb40449 s4:librpc/dcerpc_smb2: make use of smbXcli_session_application_key()
metze
2012-08-01 14:17:13 +02:00
Andrew Bartlett
fc6d7bfbe7 s4-librpc: Fix private context for dcerpc_connect_timeout_handler
This was incorrect in 02a356ea77.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jul 29 14:54:33 CEST 2012 on sn-devel-104
2012-07-29 14:54:32 +02:00
Andrew Bartlett
02a356ea77 s4-librpc: Ensure we do not call call the decrpc timeout handler during gensec_update()
This avoids a situation where we could destroy pointers on the stack due to
a nested event loop.

This is certainly not a final, generic solution, but it is a minimal change
while we work to make gensec and gensec_gssapi async.

Andrew Bartlett
2012-07-18 09:32:53 +02:00
Andreas Schneider
197781a651 s4-librpc: Add capabilities check for AES encrypted connections.
Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 13:26:34 +02:00
Stefan Metzmacher
780006db9d s4:librpc/rpc: add DCERPC_SCHANNEL_AES support
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 10:58:39 +02:00
Stefan Metzmacher
342a2e6181 s4:librpc/rpc/dcerpc_schannel: just append NETLOGON_NEG_RODC_PASSTHROUGH as rodc
The RODC stuff doesn't depend on the schannel algorithm.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 10:58:38 +02:00
Stefan Metzmacher
e7c7a91130 s4:librpc/rpc/dcerpc_schannel: rework downgrade logic
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 10:58:38 +02:00
Stefan Metzmacher
5629eb7802 s4:librpc: create a binding on the pipe if necessary in dcerpc_pipe_open_smb2_send()
Pair-Programmed-With: Michael Adam <obnox@samba.org>
2012-04-27 17:44:06 +02:00
Stefan Metzmacher
df27ba3e8b s4:librpc/rpc: directly return after composite_error()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Apr 23 12:17:08 CEST 2012 on sn-devel-104
2012-04-23 12:17:08 +02:00
Stefan Metzmacher
0971a4ee6c s4:librpc/rpc: also parse ncacn_packet pdus with LIBNDR_FLAG_OBJECT_PRESENT
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr  3 23:06:31 CEST 2012 on sn-devel-104
2012-04-03 23:06:30 +02:00
Stefan Metzmacher
05ceb53dda s4:librpc/rpc: don't mix up paylod ndr flags with the dcerpc layer
If the transfer syntax is NDR64, it's only for the payload not
for the dcerpc pdus.

metze
2012-04-03 20:02:10 +02:00
Jelmer Vernooij
95ca5fbadd libndr: Rename ndr64_transfer_syntax and null_ndr_syntax_id so they have a ndr_ prefix.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Jelmer Vernooij
0affe19304 Remove more unnecessary shebang lines in python files.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Mar 16 02:48:52 CET 2012 on sn-devel-104
2012-03-16 02:48:52 +01:00
Stefan Metzmacher
ebcfa61d9f s4:librpc/rpc: avoid an unused talloc_reference() from dcerpc_request_send()
metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
bb75905b6a s4:librpc/rpc: pass a mem_ctx to dcerpc_request_send()
metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
cd1d5a29d4 s4:librpc/rpc: use tevent_req_defer_callback() in dcerpc_alter_context_*
metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
6d631e52cf s4:librpc/rpc: use tevent_req_defer_callback() in dcerpc_bind_*
metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
198c5ace6f s4:librpc/rpc: convert dcerpc_alter_context_send/recv to tevent_req
Many thanks to Andrew Bartlett <abartlet@samba.org> for the
debugging, which lead to the following line:

       talloc_steal(state, raw_packet->data);

metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
6b81d71f3e s4:librpc/rpc: convert dcerpc_bind_send/recv to tevent_req
Many thanks to Andrew Bartlett <abartlet@samba.org> for the
debugging, which lead to the following line:

       talloc_steal(state, raw_packet->data);

metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
946eca438d s4:librpc/rpc: also notify requests which are not shipped about a dead connection
metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
080549f467 s4:librpc/rpc: ship requests via an immediate event
Deep inside dcerpc_ship_next_request() some code path
could trigger dcerpc_connection_dead(), which means
it's not safe to do any processing after calling dcerpc_ship_next_request().

metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
553a8921a4 s4:librpc/rpc: if the connecion is dead we're done
There's no point in doing anymore processing,
it can just lead to crashes.

metze
2012-03-15 07:35:28 +01:00
Stefan Metzmacher
6949a79087 s4:librpc/rpc: if the connection is dead we don't want to be called recursivly.
metze
2012-03-15 07:35:28 +01:00
Andrew Bartlett
193078117d s4-librpc: Remove unused new_ev
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar  9 07:18:45 CET 2012 on sn-devel-104
2012-03-09 07:18:45 +01:00
Stefan Metzmacher
7b1fb08842 s4:librpc/rpc: make dcerpc_bh_raw_call_* more robust against disconnects and timeouts
Using tevent_req_defer_callback() should make the situation a bit better,
until we have a common robust low level dcerpc library.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  7 18:44:24 CET 2012 on sn-devel-104
2012-03-07 18:44:24 +01:00
Stefan Metzmacher
01c404a67c s4:librpc/rpc: make dcerpc_bh_is_connected() more robust
metze
2012-03-07 17:01:17 +01:00
Michael Adam
e9210987c6 s4:libcli:smb2: add a previous session argument to smb2_connect_send() 2012-02-28 00:08:53 +01:00
Stefan Metzmacher
07b1de98cd s4:librpc/dcerpc_smb2: make use of smb2cli_session_application_key()
metze
2012-02-27 12:51:34 +01:00
Stefan Metzmacher
1b45f2aed8 s4:pyrpc: add 'user_session_key' getter to the connection object
This gets the session key from gensec for usage in DRSUAPI.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 22:31:52 CET 2012 on sn-devel-104
2012-01-04 22:31:52 +01:00
Andreas Schneider
a7541fc27e s4-librpc: Fix netlogon schannel client connect.
As a client we request as much flags as possible. The server checks
which flags it supports and returns the same negotiation flags or less.
So we need to store the negotiate flags from the server. We need them
later if we have to call netr_LogonGetCapabilities.
2011-12-22 17:48:24 +01:00
Andreas Schneider
17d124490b s4-librpc: Fix NETLOGON credential chain with Windows 2008.
Windows Server 2008 returns NT_STATUS_DOWNGRADE_DETECTED if you call
netrServerAuthenticate2 during a domain join without setting the strong
keys flag (128bit crypto).

Only for NT4 we need to do a downgrade to the returned negotiate flags.

See also 0970369ca0.
2011-12-14 13:41:28 +01:00
Stefan Metzmacher
4afbda221c s4:libcli/raw: implement on top of smbXcli_conn/req
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
2011-11-30 15:13:36 +01:00
Stefan Metzmacher
300343d16c s4:libcli/smb2: implement on top of smbXcli_conn/req
metze
2011-11-24 19:02:33 +01:00
Matthieu Patou
7c9b3cdcf7 s4-librpc: do not limit to the first IP when trying to do a rpc connection
The function continue_ip_resolve_name was calling resolve_name_recv which returns
only the first IP for a given hostname.
Instead we use resolve_name_multiple_recv which returns all the IP for a given
hostname. This kind of problem can occur if a host has more than 1 IP but is listenning
only on 1.
2011-11-11 20:28:11 +01:00
Stefan Metzmacher
6c07505b15 s4:librpc/dcerpc_smb2: fix smb2_write_callback()
The should use smb2_write_recv() to get the result.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct 28 09:55:48 CEST 2011 on sn-devel-104
2011-10-28 09:55:48 +02:00
Stefan Metzmacher
926b3394b6 s4:librpc/dcerpc_smb: fix smb_write_callback()
The should use smb_raw_write_recv() to get the result.

metze
2011-10-28 08:11:00 +02:00
David Disseldorp
281fc93c6b libcli: move ioctl function field defs to smb_constants
Currently there are a lot of duplicate ioctl function field definitions
between source3 and source4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
Andrew Bartlett
e7d5f0a357 gensec: move event context from gensec_*_init() to gensec_update()
This avoids keeping the event context around on a the gensec_security
context structure long term.

In the Samba3 server, the event context we either supply is a NULL
pointer as no server-side modules currently use the event context.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:33 +11:00
Andrew Bartlett
3cdb1fe440 s4-messaging: Pass the loadparm context, not just the messaging path
This will allow the TDB layer to get at the lp_ctx for tdb options.

Andrew Bartlett
2011-10-13 14:06:07 +02:00
Andrew Tridgell
3e685f5995 s4-rpc: show binding string in failed rpc binds
this makes debugging some RPC auth issues easier
2011-09-22 10:00:49 +10:00
Stefan Metzmacher
afabf12251 s4:librpc/rpc: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places.

metze
2011-09-14 18:03:18 +02:00
Andrew Bartlett
8c33036a37 s4-subdomain more work on sub-domain join
we can now create a subdomain of an existing windows domain using:

  samba-tool domain join sub.domain.dns.name subdomain

The ordering of the creation of the key records is quite tricky,
especially for the NTDSDSA object

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-09-13 15:38:02 +10:00
Jelmer Vernooij
df1d3dc777 s4-python: Consistently use spaces rather than tabs, fix headers in several places. 2011-09-13 02:24:03 +02:00
Simo Sorce
4a8fdc3958 s4:librpc: use tevent_ fn names instead of legacy event_ ones 2011-08-13 09:54:15 -04:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Andreas Schneider
68e7b9307a s4-librpc: Fix double free.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Aug  4 12:31:18 CEST 2011 on sn-devel-104
2011-08-04 12:31:18 +02:00
Andrew Bartlett
d3fe48ba48 gensec: Remove mem_ctx from calls that do not return memory
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Matthias Dieter Wallnöfer
7ebafb000a s4:librpc/rpc/dcerpc.c - janitorial: use "void" for functions without arguments
Probably a mistake in commit 907cdb5de7.

Reviewed-by: Tridge
2011-06-09 09:35:08 +02:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Tridgell
66aec3cf67 s4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c
the code is now generic to both V4 and V6
2011-06-06 12:26:11 +10:00
Andrew Tridgell
5d2dbf93b3 s4-ipv6: allow for IPv6 in dcerpc socket calls 2011-06-06 12:26:11 +10:00
Andrew Bartlett
cdd802af83 s4-messaging Rename messaging -> imessaging
This avoid symbol and structure conflicts between Samba3 and Samba4,
and chooses a less generic name.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Stefan Metzmacher
578cbf1139 s4:libcli/smb2: convert smb2_connect_*() to tevent_req
metze
2011-04-28 20:35:49 +02:00
Günther Deschner
b903c28939 librpc: bring more librpc prototypes in common.
Guenther
2011-03-23 23:59:11 +01:00
Stefan Metzmacher
72c1fe0081 librpc/rpc: move DCERPC_ flags to rpc_common.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar 13 20:45:53 CET 2011 on sn-devel-104
2011-03-13 20:45:53 +01:00
Stefan Metzmacher
c1a2fd1cd1 s4:librpc/rpc: finaly make struct rpc_request and enum rpc_request_state private
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar 13 17:46:02 CET 2011 on sn-devel-104
2011-03-13 17:46:02 +01:00
Stefan Metzmacher
81063f9a26 s4:librpc/rpc: remove unused dcerpc_request()
metze
2011-03-13 17:01:00 +01:00
Stefan Metzmacher
f8030ec080 s4:librpc/rpc: make dcerpc_request_recv() static
metze
2011-03-13 17:00:59 +01:00
Stefan Metzmacher
26351bf480 s4:pyrpc: use dcerpc_binding_handle_raw_call() instead of dcerpc_request()
metze
2011-03-13 16:53:16 +01:00
Stefan Metzmacher
fa0f0c2107 s4:pyrpc: fix memory leaks in error pathes
metze
2011-03-13 16:53:06 +01:00
Stefan Metzmacher
08dca92499 librpc/rpc: move struct dcerpc_binding to rpc_common.h
metze
2011-03-13 16:53:05 +01:00
Stefan Metzmacher
83c55ac67e librpc/rpc: move enum dcerpc_transport_t to rpc_common.h
metze
2011-03-13 16:33:06 +01:00
Stefan Metzmacher
b0d54da746 s4:librpc/rpc: s/dcerpc_security/dcecli_security
We'll use 'dcerpc_security' for the generic dcerpc
client and server code.

metze
2011-03-13 16:33:06 +01:00
Stefan Metzmacher
4d4c6315fa s4:librpc/rpc: remove unused dcerpc_ndr_request* code
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar 13 11:19:59 CET 2011 on sn-devel-104
2011-03-13 11:19:59 +01:00
Stefan Metzmacher
b738e092a2 librpc/rpc: move dcerpc_binding_handle stuff to rpc_common.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar 11 12:28:08 CET 2011 on sn-devel-104
2011-03-11 12:28:08 +01:00
Stefan Metzmacher
c774a50aaf s4:librpc/rpc: s/struct dcerpc_connection/struct dcecli_connection/g
The name 'struct dcerpc_connection' will be used in the new generic
dcerpc code. It will be used for client and server.

metze
2011-03-11 11:02:23 +01:00
Andrew Tridgell
5ec284d152 build: moved librpc/rpc/*.c into a rpccommon library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Feb 24 02:42:37 CET 2011 on sn-devel-104
2011-02-24 02:42:37 +01:00
Matthias Dieter Wallnöfer
0932c91186 s4:librpc/rpc/dcerpc_connect.c - fix uninitialised variable 2011-01-12 19:52:19 +01:00
Jelmer Vernooij
5792fa90ac s4-python: Only set BASETYPE flag if subclassing is supported.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 03:39:58 CET 2011 on sn-devel-104
2011-01-01 03:39:58 +01:00
Jelmer Vernooij
09a2f14c84 pyrpc: Add prototype for init function.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 18 03:04:23 CET 2010 on sn-devel-104
2010-12-18 03:04:23 +01:00
Stefan Metzmacher
5fcbb16760 s4:pyrpc_util: s/typename/type_name to avoid c++ warnings
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Dec  9 17:55:57 CET 2010 on sn-devel-104
2010-12-09 17:55:57 +01:00
Stefan Metzmacher
63574fda0e s4:python: add PyString_FromStringOrNULL() to pyrpc_util
metze
2010-12-08 19:06:52 +01:00
Arnaud Faucher
2ac5cedb71 Avoid the use of PyAPI_DATA, which is for internal Python API's.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104
2010-11-22 00:52:56 +01:00
Andrew Tridgell
808edd0293 s4-rpc: make rpc connect less verbose 2010-11-21 23:10:14 +11:00
Andrew Tridgell
9bae4cd3d9 s4-rpc: added target_principal binding handle option
this allows you to specify a target SPN for a connection

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-01 22:31:57 -07:00
Andrew Tridgell
8efd1074c2 s4-pyrpc: fixed build on python 2.4
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-09-20 15:27:45 -07:00
Kamen Mazdrashki
c79861a14e s4-pyrpc: Print location and type name we got when checking for types 2010-09-17 13:53:03 +03:00
Andrew Tridgell
fb81cc080d s4-pyrpc: allow python to access irpc interfaces
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-17 19:02:19 +10:00
Andrew Tridgell
e5ac820b9e s4-pyrpc: added py_return_ndr_struct()
This can be used to return structures from other python interfaces as
python objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 07:24:01 +10:00
Andrew Tridgell
67ac8555b1 s4-auth: set the RODC bit for RODC schannel
When we are using SEC_CHAN_RODC we need to set the
NETLOGON_NEG_RODC_PASSTHROUGH bit in the negotiated flags in
ServerAuthenticate2

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10:00
Andrew Tridgell
52445e1583 s4-schannel: fixed reference to context after free
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10:00
Julien Kerihuel
e5e5a1110f Add unique IP address binding for client connections (EPM and ncacn_ip_tcp levels)
This allows for binding strings like this:

  ncacn_ip_tcp:host[localaddress=192.168.2.1,seal]

which will force the connection to be locally bound to the specified
IP address

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-07 09:55:14 +10:00
Stefan Metzmacher
54d2dce7b1 librpc/rpc: add dcerpc_binding_handle_set_timeout()
metze
2010-09-04 09:01:19 +02:00
Stefan Metzmacher
99a26edcb3 s4:librpc/rpc: implement dcerpc_bh_set_timeout()
metze
2010-09-04 09:01:12 +02:00
Stefan Metzmacher
27918981de librpc/rpc: add set_timeout() to dcerpc_binding_handle_ops
metze
2010-09-04 09:01:11 +02:00
Jelmer Vernooij
0bc53f7d9f pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection. 2010-09-03 02:39:38 +02:00
Jelmer Vernooij
64552e11dd pyrpc: Add py_check_dcerpc_type().
This function checks whether the type of a PyObject matches a
DCE/RPC Python type.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2010-08-27 04:41:40 +02:00
Andrew Tridgell
f0803de830 s4-pyrpc: use s4_event_context_init()
This fixes a crash when using kerberos and the python dcercpc
interface, which requires event nesting

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Tridgell
24159a59a3 pidl: give the varible name for bad type in python calls
This makes it much clearer which argument to a function had the wrong
type
2010-08-22 14:57:34 +10:00
Stefan Metzmacher
fe7819ae6f librpc/rpc: move dcerpc_read_ncacn_packet_send/recv() to dcerpc_util.c
metze
2010-08-20 18:09:25 +02:00
Stefan Metzmacher
b34209006f s4:librpc/rpc: make struct dcerpc_binding_handle private
metze
2010-08-12 14:31:21 +02:00
Stefan Metzmacher
7eef08cc63 s4:librpc/rpc: add dcerpc_binding_handle dcerpc_pipe backend
metze
2010-08-12 14:31:17 +02:00
Stefan Metzmacher
4030bc9b2d librpc/rpc: add dcerpc_binding_handle abstration
metze
2010-08-12 14:31:17 +02:00
Stefan Metzmacher
2828318743 s4:librpc/rpc: fix dcerpc_log_packet() prototype
metze
2010-08-12 14:31:17 +02:00
Stefan Metzmacher
af89b460f7 s4:librpc/rpc: autodetect the need of async call logic
metze
2010-08-12 14:31:16 +02:00
Stefan Metzmacher
31782e5295 s4:librpc/rpc: avoid using DCERPC_NDR_REF_ALLOC for epm_Map()
metze
2010-08-02 17:42:50 +02:00
Stefan Metzmacher
1675619656 s4:librpc/rpc: use the correct ndr flags in dcerpc_ndr_validate_in()
metze
2010-07-31 09:07:45 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Simo Sorce
e340aa40d1 dcerpc: move dcerpc_pull_auth_trailer into a the common dcerpc_util.c file
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:10 +02:00
Günther Deschner
716f9d6847 s4-dcerpc: move some util functions up to main librpc directory.
Guenther

Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13 14:44:09 +02:00
Andrew Tridgell
4cb423f527 s4-python: python is not always in /usr/bin
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Jelmer Vernooij
5060367bf9 pyrpc: Fix reference counting when using secondary connections. 2010-06-19 22:46:44 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00