diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-08 11:35:53 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-08 13:12:15 +0100 |
commit | 494b2aff8826947e3bd556aecb175746163da485 (patch) | |
tree | 55168d16ade6971be5de092305eb7a3016336820 /source3 | |
parent | 98fb71782e05ae72cd6abeb38b6e0b96a50c1761 (diff) | |
download | samba-494b2aff8826947e3bd556aecb175746163da485.tar.gz samba-494b2aff8826947e3bd556aecb175746163da485.tar.bz2 samba-494b2aff8826947e3bd556aecb175746163da485.zip |
s3: Do not reference ndr_table when calling rpc_srv_register
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 5 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_wbint.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 9 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual_ndr.c | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 3d62e505b3..4f204d0c54 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5819,9 +5819,8 @@ NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *srv, const struct ndr_syntax_id *interface, const struct api_struct *cmds, int size); -NTSTATUS rpc_srv_register(int version, const char *clnt, - const char *srv, - const struct ndr_interface_table *iface, +NTSTATUS rpc_srv_register(int version, const char *clnt, const char *srv, + const char *interface, uint32_t interface_version, const struct api_struct *cmds, int size); bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax); bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p); diff --git a/source3/librpc/gen_ndr/srv_wbint.c b/source3/librpc/gen_ndr/srv_wbint.c index a7112cb94b..9144a467e0 100644 --- a/source3/librpc/gen_ndr/srv_wbint.c +++ b/source3/librpc/gen_ndr/srv_wbint.c @@ -2140,5 +2140,5 @@ NTSTATUS rpc_wbint_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, co NTSTATUS rpc_wbint_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wbint", "wbint", &ndr_table_wbint, api_wbint_cmds, sizeof(api_wbint_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wbint", "wbint", NDR_WBINT_UUID, NDR_WBINT_VERSION, api_wbint_cmds, sizeof(api_wbint_cmds) / sizeof(struct api_struct)); } 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; diff --git a/source3/winbindd/winbindd_dual_ndr.c b/source3/winbindd/winbindd_dual_ndr.c index 916499ad9c..3546a78fd6 100644 --- a/source3/winbindd/winbindd_dual_ndr.c +++ b/source3/winbindd/winbindd_dual_ndr.c @@ -293,7 +293,7 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain, * Just a dummy to make srv_wbint.c happy */ 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) { return NT_STATUS_OK; |