summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_tcp.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-09-11 15:11:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:39 -0500
commit909c9b681a0718b8701e05addbad08c0aec87113 (patch)
treed569f2f54075a0514fa6e4b591d383f47e8d631d /source4/librpc/rpc/dcerpc_tcp.c
parent4490c816a90871cd93b1a709bae91e5176e4f599 (diff)
downloadsamba-909c9b681a0718b8701e05addbad08c0aec87113.tar.gz
samba-909c9b681a0718b8701e05addbad08c0aec87113.tar.bz2
samba-909c9b681a0718b8701e05addbad08c0aec87113.zip
r2284: Thanks to some great detective work by tridge, NTLM2 signing now works.
This means that 'require NTLMv2 session security' now works for RPC pipe signing. We don't yet have sealing, but it can't be much further. This is almost all tridge's code, munged into a form that can work with the GENSEC API. This commit also includes more lsakey fixes - that key is used for all DCE-RPC level authenticated connections, even over CIFS/ncacn_np. No doubt I missed something, but I'm going to get some sleep :-) Andrew Bartlett (This used to be commit a1fe175eec884280fb7e9ca8f528134cf4600beb)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_tcp.c')
-rw-r--r--source4/librpc/rpc/dcerpc_tcp.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/source4/librpc/rpc/dcerpc_tcp.c b/source4/librpc/rpc/dcerpc_tcp.c
index c290891b61..2152c4c5d0 100644
--- a/source4/librpc/rpc/dcerpc_tcp.c
+++ b/source4/librpc/rpc/dcerpc_tcp.c
@@ -87,6 +87,10 @@ static void tcp_process_send(struct dcerpc_pipe *p)
}
break;
}
+ if (ret == 0) {
+ tcp_sock_dead(p, NT_STATUS_NET_WRITE_FAULT);
+ break;
+ }
blob->data.data += ret;
blob->data.length -= ret;
@@ -271,19 +275,6 @@ static const char *tcp_peer_name(struct dcerpc_pipe *p)
return tcp->server_name;
}
-
-/*
- fetch the user session key
-*/
-NTSTATUS tcp_session_key(struct dcerpc_pipe *p, DATA_BLOB *session_key)
-{
- /* this took quite a few CPU cycles to find ... */
- session_key->data = "SystemLibraryDTC";
- session_key->length = 16;
-
- return NT_STATUS_OK;
-}
-
/*
open a rpc connection to a named pipe
*/
@@ -331,7 +322,6 @@ NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p,
(*p)->transport.shutdown_pipe = tcp_shutdown_pipe;
(*p)->transport.peer_name = tcp_peer_name;
- (*p)->transport.session_key = tcp_session_key;
tcp = talloc((*p), sizeof(*tcp));
if (!tcp) {
@@ -356,5 +346,8 @@ NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p,
(*p)->transport.private = tcp;
+ /* ensure we don't get SIGPIPE */
+ BlockSignals(True,SIGPIPE);
+
return NT_STATUS_OK;
}