diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-14 12:21:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-14 12:21:21 +0000 |
commit | a05882b34beffae26723a6b22a467ab10ee28dfe (patch) | |
tree | 43d4d5adff04920d67c95e238cb1ddc3074ef842 /source4 | |
parent | b356f3e43e360a409cd30fac97a0902d9b7ef11f (diff) | |
download | samba-a05882b34beffae26723a6b22a467ab10ee28dfe.tar.gz samba-a05882b34beffae26723a6b22a467ab10ee28dfe.tar.bz2 samba-a05882b34beffae26723a6b22a467ab10ee28dfe.zip |
fixed fragmented signed connections to our rpc server over SMB
(This used to be commit f5df126c254bcb96dfb42096d7247215c7e7a89a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/idl/dcerpc.idl | 1 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl index afe4b3003f..cf195b6aea 100644 --- a/source4/librpc/idl/dcerpc.idl +++ b/source4/librpc/idl/dcerpc.idl @@ -36,6 +36,7 @@ interface dcerpc const uint8 DCERPC_REQUEST_LENGTH = 24; + const uint8 DCERPC_MAX_SIGN_SIZE = 32; typedef struct { uint32 alloc_hint; diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index f1756215b1..3dcaca83ec 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -426,7 +426,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p, /* we can write a full max_recv_frag size, minus the dcerpc request header size */ - chunk_size = p->srv_max_recv_frag - DCERPC_REQUEST_LENGTH; + chunk_size = p->srv_max_recv_frag - (DCERPC_MAX_SIGN_SIZE+DCERPC_REQUEST_LENGTH); pkt.ptype = DCERPC_PKT_REQUEST; pkt.call_id = p->call_id++; diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 16b573cfad..a34c00cd58 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -467,7 +467,9 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call) length = stub.length; if (length + DCERPC_RESPONSE_LENGTH > call->dce->cli_max_recv_frag) { - length = call->dce->cli_max_recv_frag - DCERPC_RESPONSE_LENGTH; + /* the 32 is to cope with signing data */ + length = call->dce->cli_max_recv_frag - + (DCERPC_MAX_SIGN_SIZE+DCERPC_RESPONSE_LENGTH); } /* form the dcerpc response packet */ |