diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-09-30 04:59:56 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-30 06:47:23 +0200 |
commit | eb1de4f0ed149dd2b348d756f091809d934309a1 (patch) | |
tree | 991718924c331b1fe943d024af6ba7babb4d5d87 | |
parent | abe0af4ab417086d413f02cadf7315a8f801a0f8 (diff) | |
download | samba-eb1de4f0ed149dd2b348d756f091809d934309a1.tar.gz samba-eb1de4f0ed149dd2b348d756f091809d934309a1.tar.bz2 samba-eb1de4f0ed149dd2b348d756f091809d934309a1.zip |
s4:librpc/rpc: correctly sign or seal rpc request with an object guid
metze
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 5bbcc5e91c..c1e3e26ee9 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -334,6 +334,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, DATA_BLOB creds2; size_t payload_length; enum ndr_err_code ndr_err; + size_t hdr_size = DCERPC_REQUEST_LENGTH; /* non-signed packets are simpler */ if (sig_size == 0) { @@ -367,6 +368,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) { ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT; + hdr_size += 16; } ndr_err = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt); @@ -415,7 +417,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, case DCERPC_AUTH_LEVEL_PRIVACY: status = gensec_seal_packet(c->security_state.generic_state, mem_ctx, - blob->data + DCERPC_REQUEST_LENGTH, + blob->data + hdr_size, payload_length, blob->data, blob->length, @@ -428,7 +430,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, case DCERPC_AUTH_LEVEL_INTEGRITY: status = gensec_sign_packet(c->security_state.generic_state, mem_ctx, - blob->data + DCERPC_REQUEST_LENGTH, + blob->data + hdr_size, payload_length, blob->data, blob->length, |