diff options
-rw-r--r-- | librpc/gen_ndr/srv_dfs.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_dssetup.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_echo.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_epmapper.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_eventlog.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_initshutdown.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_lsa.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_netlogon.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_ntsvcs.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_samr.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_srvsvc.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_svcctl.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_winreg.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_wkssvc.c | 2 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 2 | ||||
-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 |
20 files changed, 27 insertions, 23 deletions
diff --git a/librpc/gen_ndr/srv_dfs.c b/librpc/gen_ndr/srv_dfs.c index f3cdbadfd7..d691753612 100644 --- a/librpc/gen_ndr/srv_dfs.c +++ b/librpc/gen_ndr/srv_dfs.c @@ -1927,5 +1927,5 @@ NTSTATUS rpc_netdfs_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_netdfs_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", &ndr_table_netdfs, api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", NDR_NETDFS_UUID, NDR_NETDFS_VERSION, api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_dssetup.c b/librpc/gen_ndr/srv_dssetup.c index 5bdc6ed35c..361fbaaf87 100644 --- a/librpc/gen_ndr/srv_dssetup.c +++ b/librpc/gen_ndr/srv_dssetup.c @@ -926,5 +926,5 @@ NTSTATUS rpc_dssetup_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_dssetup_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", &ndr_table_dssetup, api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", NDR_DSSETUP_UUID, NDR_DSSETUP_VERSION, api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_echo.c b/librpc/gen_ndr/srv_echo.c index ac8a9a3f36..fb62000a91 100644 --- a/librpc/gen_ndr/srv_echo.c +++ b/librpc/gen_ndr/srv_echo.c @@ -910,5 +910,5 @@ NTSTATUS rpc_rpcecho_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_rpcecho_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "rpcecho", "rpcecho", &ndr_table_rpcecho, api_rpcecho_cmds, sizeof(api_rpcecho_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "rpcecho", "rpcecho", NDR_RPCECHO_UUID, NDR_RPCECHO_VERSION, api_rpcecho_cmds, sizeof(api_rpcecho_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_epmapper.c b/librpc/gen_ndr/srv_epmapper.c index 8648b011df..72f18c03ba 100644 --- a/librpc/gen_ndr/srv_epmapper.c +++ b/librpc/gen_ndr/srv_epmapper.c @@ -729,5 +729,5 @@ NTSTATUS rpc_epmapper_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_epmapper_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", &ndr_table_epmapper, api_epmapper_cmds, sizeof(api_epmapper_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", NDR_EPMAPPER_UUID, NDR_EPMAPPER_VERSION, api_epmapper_cmds, sizeof(api_epmapper_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_eventlog.c b/librpc/gen_ndr/srv_eventlog.c index 9b53d33da1..0a0f92e998 100644 --- a/librpc/gen_ndr/srv_eventlog.c +++ b/librpc/gen_ndr/srv_eventlog.c @@ -2177,5 +2177,5 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_eventlog_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", &ndr_table_eventlog, api_eventlog_cmds, sizeof(api_eventlog_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION, api_eventlog_cmds, sizeof(api_eventlog_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_initshutdown.c b/librpc/gen_ndr/srv_initshutdown.c index d06f5628c3..9eba9d3035 100644 --- a/librpc/gen_ndr/srv_initshutdown.c +++ b/librpc/gen_ndr/srv_initshutdown.c @@ -273,5 +273,5 @@ NTSTATUS rpc_initshutdown_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ NTSTATUS rpc_initshutdown_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", &ndr_table_initshutdown, api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", NDR_INITSHUTDOWN_UUID, NDR_INITSHUTDOWN_VERSION, api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_lsa.c b/librpc/gen_ndr/srv_lsa.c index 705d67b42b..1b4faa75bc 100644 --- a/librpc/gen_ndr/srv_lsa.c +++ b/librpc/gen_ndr/srv_lsa.c @@ -7153,5 +7153,5 @@ NTSTATUS rpc_lsarpc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_lsarpc_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", &ndr_table_lsarpc, api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", NDR_LSARPC_UUID, NDR_LSARPC_VERSION, api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_netlogon.c b/librpc/gen_ndr/srv_netlogon.c index a288c77cd6..fc1c85a40d 100644 --- a/librpc/gen_ndr/srv_netlogon.c +++ b/librpc/gen_ndr/srv_netlogon.c @@ -4540,5 +4540,5 @@ NTSTATUS rpc_netlogon_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_netlogon_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", &ndr_table_netlogon, api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION, api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_ntsvcs.c b/librpc/gen_ndr/srv_ntsvcs.c index 0b451b8d65..2b43c95a3a 100644 --- a/librpc/gen_ndr/srv_ntsvcs.c +++ b/librpc/gen_ndr/srv_ntsvcs.c @@ -5314,5 +5314,5 @@ NTSTATUS rpc_ntsvcs_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_ntsvcs_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", &ndr_table_ntsvcs, api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", NDR_NTSVCS_UUID, NDR_NTSVCS_VERSION, api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_samr.c b/librpc/gen_ndr/srv_samr.c index 62a2aedea7..f6c47fa15d 100644 --- a/librpc/gen_ndr/srv_samr.c +++ b/librpc/gen_ndr/srv_samr.c @@ -6263,5 +6263,5 @@ NTSTATUS rpc_samr_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con NTSTATUS rpc_samr_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "samr", "samr", &ndr_table_samr, api_samr_cmds, sizeof(api_samr_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "samr", "samr", NDR_SAMR_UUID, NDR_SAMR_VERSION, api_samr_cmds, sizeof(api_samr_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index 72132dc312..97e84a13e1 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -9724,5 +9724,5 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, NTSTATUS rpc_spoolss_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", NDR_SPOOLSS_UUID, NDR_SPOOLSS_VERSION, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_srvsvc.c b/librpc/gen_ndr/srv_srvsvc.c index f84bfd934b..6cf72707af 100644 --- a/librpc/gen_ndr/srv_srvsvc.c +++ b/librpc/gen_ndr/srv_srvsvc.c @@ -4684,5 +4684,5 @@ NTSTATUS rpc_srvsvc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_srvsvc_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", &ndr_table_srvsvc, api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION, api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_svcctl.c b/librpc/gen_ndr/srv_svcctl.c index 8424a62354..895687f764 100644 --- a/librpc/gen_ndr/srv_svcctl.c +++ b/librpc/gen_ndr/srv_svcctl.c @@ -4174,5 +4174,5 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_svcctl_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", &ndr_table_svcctl, api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", NDR_SVCCTL_UUID, NDR_SVCCTL_VERSION, api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_winreg.c b/librpc/gen_ndr/srv_winreg.c index c457732298..453a1dbde7 100644 --- a/librpc/gen_ndr/srv_winreg.c +++ b/librpc/gen_ndr/srv_winreg.c @@ -3129,5 +3129,5 @@ NTSTATUS rpc_winreg_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_winreg_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", &ndr_table_winreg, api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", NDR_WINREG_UUID, NDR_WINREG_VERSION, api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct)); } diff --git a/librpc/gen_ndr/srv_wkssvc.c b/librpc/gen_ndr/srv_wkssvc.c index 8b0ea51bfe..ce8250b581 100644 --- a/librpc/gen_ndr/srv_wkssvc.c +++ b/librpc/gen_ndr/srv_wkssvc.c @@ -2690,5 +2690,5 @@ NTSTATUS rpc_wkssvc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c NTSTATUS rpc_wkssvc_init(void) { - return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", &ndr_table_wkssvc, api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct)); + return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION, api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct)); } diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 560f28d0e3..ba592f5fd0 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -306,7 +306,7 @@ sub ParseInterface($) pidl_hdr "NTSTATUS rpc_$if->{NAME}_init(void);"; pidl "NTSTATUS rpc_$if->{NAME}_init(void)"; pidl "{"; - pidl "\treturn rpc_srv_register(SMB_RPC_INTERFACE_VERSION, \"$if->{NAME}\", \"$if->{NAME}\", \&ndr_table_$if->{NAME}, api_$if->{NAME}_cmds, sizeof(api_$if->{NAME}_cmds) / sizeof(struct api_struct));"; + pidl "\treturn rpc_srv_register(SMB_RPC_INTERFACE_VERSION, \"$if->{NAME}\", \"$if->{NAME}\", NDR_".$uif."_UUID, NDR_".$uif."_VERSION, api_$if->{NAME}_cmds, sizeof(api_$if->{NAME}_cmds) / sizeof(struct api_struct));"; pidl "}"; pidl_hdr "#endif /* __SRV_$uif\__ */"; 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; |