summaryrefslogtreecommitdiff
path: root/source4/rpc_server/epmapper
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-02-04 01:32:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:31 -0500
commit60d9b40ba4fec876b7288bd51340d6b302af00e3 (patch)
tree71a0369df1326cb34fd2b55040e45742113f8704 /source4/rpc_server/epmapper
parent10c211f2afc45e7a75f024c946a5c8232d7efd6b (diff)
downloadsamba-60d9b40ba4fec876b7288bd51340d6b302af00e3.tar.gz
samba-60d9b40ba4fec876b7288bd51340d6b302af00e3.tar.bz2
samba-60d9b40ba4fec876b7288bd51340d6b302af00e3.zip
r5209: Fix the endpoint mapper to work with IPX endpoints (which
accidently have the same protocol id as UUID's) Before this, Samba would give NDR errors when contacting a remote server that has IPX support enabled. This one was on my long due bugs list. (This used to be commit 7b847de64f35b8e897b64ad047d8aea3813214f8)
Diffstat (limited to 'source4/rpc_server/epmapper')
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index eb9598b6be..8a61fc6428 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -187,6 +187,8 @@ 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;
count = build_ep_list(mem_ctx, dce_call->conn->dce_ctx->endpoint_list, &eps);
@@ -208,9 +210,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);
+
if (floors[1].lhs.protocol != EPM_PROTOCOL_UUID ||
- guid_cmp(mem_ctx, &floors[1].lhs.info.uuid.uuid, NDR_GUID) != 0 ||
- floors[1].lhs.info.uuid.version != NDR_GUID_VERSION) {
+ guid_cmp(mem_ctx, &ndr_uuid, NDR_GUID) != 0 ||
+ ndr_version != NDR_GUID_VERSION) {
goto failed;
}
@@ -226,11 +230,10 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
}
for (i=0;i<count;i++) {
- if (!GUID_equal(&r->in.map_tower->tower.floors[0].lhs.info.uuid.uuid,
- &eps[i].ep.floors[0].lhs.info.uuid.uuid) ||
- r->in.map_tower->tower.floors[0].lhs.info.uuid.version !=
- eps[i].ep.floors[0].lhs.info.uuid.version ||
- transport != dcerpc_transport_by_tower(&eps[i].ep)) {
+ if (
+ !data_blob_equal(&r->in.map_tower->tower.floors[0].lhs.lhs_data,
+ &eps[i].ep.floors[0].lhs.lhs_data)
+ || transport != dcerpc_transport_by_tower(&eps[i].ep)) {
continue;
}