summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_epmapper.c45
1 files changed, 42 insertions, 3 deletions
diff --git a/source3/rpc_parse/parse_epmapper.c b/source3/rpc_parse/parse_epmapper.c
index 368ea319bd..2bdb755deb 100644
--- a/source3/rpc_parse/parse_epmapper.c
+++ b/source3/rpc_parse/parse_epmapper.c
@@ -29,6 +29,8 @@
BOOL epm_io_handle(const char *desc, EPM_HANDLE *handle, prs_struct *ps,
int depth)
{
+ if (!prs_align(ps))
+ return False;
if (!prs_uint8s(False, "data", ps, depth, handle->data,
sizeof(handle->data)))
@@ -67,6 +69,11 @@ NTSTATUS init_epm_floor(EPM_FLOOR *floor, uint8 protocol)
case EPM_FLOOR_IP:
floor->rhs.length = sizeof(floor->rhs.ip.addr);
break;
+ case EPM_FLOOR_NMPIPES:
+ case EPM_FLOOR_LRPC:
+ case EPM_FLOOR_NETBIOS:
+ floor->rhs.length = strlen(floor->rhs.string) + 1;
+ break;
default:
break;
}
@@ -114,6 +121,33 @@ NTSTATUS init_epm_floor_ip(EPM_FLOOR *floor, uint8 addr[4])
}
/*******************************************************************
+ inits an EPM_FLOOR structure for named pipe
+********************************************************************/
+NTSTATUS init_epm_floor_np(EPM_FLOOR *floor, const char *pipe_name)
+{
+ safe_strcpy(floor->rhs.string, pipe_name, sizeof(floor->rhs.string)-1);
+ return init_epm_floor(floor, EPM_FLOOR_NMPIPES);
+}
+
+/*******************************************************************
+ inits an EPM_FLOOR structure for named pipe
+********************************************************************/
+NTSTATUS init_epm_floor_lrpc(EPM_FLOOR *floor, const char *pipe_name)
+{
+ safe_strcpy(floor->rhs.string, pipe_name, sizeof(floor->rhs.string)-1);
+ return init_epm_floor(floor, EPM_FLOOR_LRPC);
+}
+
+/*******************************************************************
+ inits an EPM_FLOOR structure for named pipe
+********************************************************************/
+NTSTATUS init_epm_floor_nb(EPM_FLOOR *floor, char *host_name)
+{
+ safe_strcpy(floor->rhs.string, host_name, sizeof(floor->rhs.string)-1);
+ return init_epm_floor(floor, EPM_FLOOR_NETBIOS);
+}
+
+/*******************************************************************
reads and writes EPM_FLOOR.
********************************************************************/
BOOL epm_io_floor(const char *desc, EPM_FLOOR *floor,
@@ -156,6 +190,14 @@ BOOL epm_io_floor(const char *desc, EPM_FLOOR *floor,
sizeof(floor->rhs.ip.addr)))
return False;
break;
+ case EPM_FLOOR_NMPIPES:
+ case EPM_FLOOR_LRPC:
+ case EPM_FLOOR_NETBIOS:
+ if (!prs_uint8s(False, "string", ps, depth,
+ floor->rhs.string,
+ floor->rhs.length))
+ return False;
+ break;
default:
break;
}
@@ -227,9 +269,6 @@ BOOL epm_io_tower(const char *desc, EPM_TOWER *tower,
return False;
}
- if (!prs_uint8("unknown", ps, depth, &tower->unknown))
- return False;
-
return True;
}