diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-26 00:59:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:17 -0500 |
commit | 42da534d66c14c60844568246a2862da7b49f1d5 (patch) | |
tree | 4c8156ae3cb44be0483bce10b5f60bad1bd286c7 /source4/rpc_server | |
parent | 7780e2bfa1e446d02a0168e85bf7713fd4ce475b (diff) | |
download | samba-42da534d66c14c60844568246a2862da7b49f1d5.tar.gz samba-42da534d66c14c60844568246a2862da7b49f1d5.tar.bz2 samba-42da534d66c14c60844568246a2862da7b49f1d5.zip |
r14735: Use dcerpc_syntax_id rather then seperate GUID + if_version everywhere
(This used to be commit a316b33057f3ec8532677980e093cd327d33f257)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 7 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.h | 3 | ||||
-rw-r--r-- | source4/rpc_server/epmapper/rpc_epmapper.c | 12 | ||||
-rw-r--r-- | source4/rpc_server/remote/dcesrv_remote.c | 9 |
4 files changed, 14 insertions, 17 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 4c39333e86..f161075fa6 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -88,8 +88,8 @@ static struct dcesrv_connection_context *dcesrv_find_context(struct dcesrv_conne static BOOL interface_match(const struct dcesrv_interface *if1, const struct dcesrv_interface *if2) { - return (if1->if_version == if2->if_version && - GUID_equal(&if1->uuid, &if2->uuid)); + return (if1->syntax_id.if_version == if2->syntax_id.if_version && + GUID_equal(&if1->syntax_id.uuid, &if2->syntax_id.uuid)); } /* @@ -113,7 +113,8 @@ static const struct dcesrv_interface *find_interface(const struct dcesrv_endpoin static BOOL interface_match_by_uuid(const struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version) { - return (iface->if_version == if_version && GUID_equal(&iface->uuid, uuid)); + return (iface->syntax_id.if_version == if_version && + GUID_equal(&iface->syntax_id.uuid, uuid)); } /* diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index f2b92c346a..ca169fa2fa 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -43,8 +43,7 @@ struct dcesrv_connection_context; struct dcesrv_interface { const char *name; - struct GUID uuid; - uint32_t if_version; + struct dcerpc_syntax_id syntax_id; /* this function is called when the client binds to this interface */ NTSTATUS (*bind)(struct dcesrv_call_state *, const struct dcesrv_interface *); diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c index 8ff4ffdf2d..2c8b56b893 100644 --- a/source4/rpc_server/epmapper/rpc_epmapper.c +++ b/source4/rpc_server/epmapper/rpc_epmapper.c @@ -65,8 +65,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx, (*eps)[total].name = iface->iface.name; description = d->ep_description; - description->object = iface->iface.uuid; - description->object_version = iface->iface.if_version; + description->object = iface->iface.syntax_id; status = dcerpc_binding_build_tower(mem_ctx, description, &(*eps)[total].ep); if (NT_STATUS_IS_ERR(status)) { @@ -175,8 +174,7 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me struct dcesrv_ep_iface *eps; struct epm_floor *floors; enum dcerpc_transport_t transport; - struct GUID ndr_uuid; - uint16_t ndr_version; + struct dcerpc_syntax_id ndr_syntax; count = build_ep_list(mem_ctx, dce_call->conn->dce_ctx->endpoint_list, &eps); @@ -198,11 +196,11 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me floors = r->in.map_tower->tower.floors; - dcerpc_floor_get_lhs_data(&r->in.map_tower->tower.floors[1], &ndr_uuid, &ndr_version); + dcerpc_floor_get_lhs_data(&r->in.map_tower->tower.floors[1], &ndr_syntax); if (floors[1].lhs.protocol != EPM_PROTOCOL_UUID || - !GUID_equal(&ndr_uuid, &ndr_transfer_syntax.uuid) || - ndr_version != ndr_transfer_syntax.if_version) { + !GUID_equal(&ndr_syntax.uuid, &ndr_transfer_syntax.uuid) || + ndr_syntax.if_version != ndr_transfer_syntax.if_version) { goto failed; } diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index 4517847b74..60dddfbfb3 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -58,7 +58,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct pass = lp_parm_string(-1, "dcerpc_remote", "password"); domain = lp_parm_string(-1, "dceprc_remote", "domain"); - table = idl_iface_by_uuid(&iface->uuid); /* FIXME: What about if_version ? */ + table = idl_iface_by_uuid(&iface->syntax_id.uuid); /* FIXME: What about if_version ? */ if (!table) { dce_call->fault_code = DCERPC_FAULT_UNK_IF; return NT_STATUS_NET_WRITE_FAULT; @@ -248,8 +248,7 @@ static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const stru static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct dcerpc_interface_table *if_tabl) { iface->name = if_tabl->name; - iface->uuid = if_tabl->uuid; - iface->if_version = if_tabl->if_version; + iface->syntax_id = if_tabl->syntax_id; iface->bind = remote_op_bind; iface->unbind = remote_op_unbind; @@ -268,8 +267,8 @@ static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const st const struct dcerpc_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next) { - if (l->table->if_version == if_version && - GUID_equal(&l->table->uuid, uuid)==0) { + if (l->table->syntax_id.if_version == if_version && + GUID_equal(&l->table->syntax_id.uuid, uuid)==0) { return remote_fill_interface(iface, l->table); } } |