diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-09-27 01:42:26 +0200 |
---|---|---|
committer | Anatoliy Atanasov <anatoliy.atanasov@postpath.com> | 2010-09-27 09:59:21 -0700 |
commit | d9d4ded71a9214917d9999da0a16aa82eeac0afb (patch) | |
tree | 1a06a3b1199b78e86dc81d9c5b2c7d9d1c15ca51 | |
parent | 3235f44ac48e6945446329d57f3ecd0d10fa47e1 (diff) | |
download | samba-d9d4ded71a9214917d9999da0a16aa82eeac0afb.tar.gz samba-d9d4ded71a9214917d9999da0a16aa82eeac0afb.tar.bz2 samba-d9d4ded71a9214917d9999da0a16aa82eeac0afb.zip |
s4:irpc: optionaly pass the security_token via IRPC requests.
metze
-rw-r--r-- | source4/lib/messaging/messaging.c | 3 | ||||
-rw-r--r-- | source4/librpc/idl/irpc.idl | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 724d66af68..0fe089332d 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -717,6 +717,7 @@ NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status) } m->header.flags |= IRPC_FLAG_REPLY; + m->header.creds.token= NULL; /* construct the packet */ ndr_err = ndr_push_irpc_header(push, NDR_SCALARS|NDR_BUFFERS, &m->header); @@ -1014,6 +1015,7 @@ struct irpc_bh_state { struct server_id server_id; const struct ndr_interface_table *table; uint32_t timeout; + struct security_token *token; }; static bool irpc_bh_is_connected(struct dcerpc_binding_handle *h) @@ -1111,6 +1113,7 @@ static struct tevent_req *irpc_bh_raw_call_send(TALLOC_CTX *mem_ctx, header.callnum = state->opnum; header.flags = 0; header.status = NT_STATUS_OK; + header.creds.token= hs->token; /* construct the irpc packet */ ndr = ndr_push_init_ctx(state->irpc); diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl index 2070d3d84f..6e2c73d94f 100644 --- a/source4/librpc/idl/irpc.idl +++ b/source4/librpc/idl/irpc.idl @@ -14,6 +14,10 @@ import "misc.idl", "security.idl", "nbt.idl"; IRPC_FLAG_REPLY = 0x0001 } irpc_flags; + typedef struct { + security_token *token; + } irpc_creds; + typedef [public] struct { GUID uuid; uint32 if_version; @@ -21,6 +25,7 @@ import "misc.idl", "security.idl", "nbt.idl"; uint32 callid; irpc_flags flags; NTSTATUS status; + [subcontext(4)] irpc_creds creds; [flag(NDR_ALIGN8)] DATA_BLOB _pad; } irpc_header; |