summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_pipe.c')
-rw-r--r--source3/rpc_server/srv_pipe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 17cc13edf5..7e0eda1c54 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1034,15 +1034,20 @@ static bool check_bind_req(struct pipes_struct *p,
*******************************************************************/
NTSTATUS rpc_srv_register(int version, const char *clnt, const char *srv,
- const struct ndr_interface_table *iface,
+ const char *interface, uint32_t interface_version,
const struct api_struct *cmds, int size)
{
struct rpc_table *rpc_entry;
+ struct ndr_syntax_id syntax;
if (!clnt || !srv || !cmds) {
return NT_STATUS_INVALID_PARAMETER;
}
+ if (!ndr_syntax_from_string(interface, interface_version, &syntax)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
if (version != SMB_RPC_INTERFACE_VERSION) {
DEBUG(0,("Can't register rpc commands!\n"
"You tried to register a rpc module with SMB_RPC_INTERFACE_VERSION %d"
@@ -1075,7 +1080,7 @@ NTSTATUS rpc_srv_register(int version, const char *clnt, const char *srv,
ZERO_STRUCTP(rpc_entry);
rpc_entry->pipe.clnt = SMB_STRDUP(clnt);
rpc_entry->pipe.srv = SMB_STRDUP(srv);
- rpc_entry->rpc_interface = iface->syntax_id;
+ rpc_entry->rpc_interface = syntax;
rpc_entry->cmds = cmds;
rpc_entry->n_cmds = size;