summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/gen_ndr/srv_dfs.c2
-rw-r--r--librpc/gen_ndr/srv_dssetup.c2
-rw-r--r--librpc/gen_ndr/srv_echo.c2
-rw-r--r--librpc/gen_ndr/srv_epmapper.c2
-rw-r--r--librpc/gen_ndr/srv_eventlog.c2
-rw-r--r--librpc/gen_ndr/srv_initshutdown.c2
-rw-r--r--librpc/gen_ndr/srv_lsa.c2
-rw-r--r--librpc/gen_ndr/srv_netlogon.c2
-rw-r--r--librpc/gen_ndr/srv_ntsvcs.c2
-rw-r--r--librpc/gen_ndr/srv_samr.c2
-rw-r--r--librpc/gen_ndr/srv_srvsvc.c2
-rw-r--r--librpc/gen_ndr/srv_svcctl.c2
-rw-r--r--librpc/gen_ndr/srv_winreg.c2
-rw-r--r--librpc/gen_ndr/srv_wkssvc.c2
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm2
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/rpc_server/srv_pipe.c10
17 files changed, 29 insertions, 15 deletions
diff --git a/librpc/gen_ndr/srv_dfs.c b/librpc/gen_ndr/srv_dfs.c
index 666874fd643..00afa36ec11 100644
--- a/librpc/gen_ndr/srv_dfs.c
+++ b/librpc/gen_ndr/srv_dfs.c
@@ -1750,5 +1750,5 @@ void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_netdfs_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", &ndr_table_netdfs.syntax_id, api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", &ndr_table_netdfs, 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 3c07ad12478..abb890fa6a6 100644
--- a/librpc/gen_ndr/srv_dssetup.c
+++ b/librpc/gen_ndr/srv_dssetup.c
@@ -841,5 +841,5 @@ void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_dssetup_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", &ndr_table_dssetup.syntax_id, api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", &ndr_table_dssetup, 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 64360792994..1912b8b9d56 100644
--- a/librpc/gen_ndr/srv_echo.c
+++ b/librpc/gen_ndr/srv_echo.c
@@ -801,5 +801,5 @@ void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_rpcecho_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "rpcecho", "rpcecho", &ndr_table_rpcecho.syntax_id, api_rpcecho_cmds, sizeof(api_rpcecho_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "rpcecho", "rpcecho", &ndr_table_rpcecho, 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 68e4a413938..b66bdf4e69a 100644
--- a/librpc/gen_ndr/srv_epmapper.c
+++ b/librpc/gen_ndr/srv_epmapper.c
@@ -642,5 +642,5 @@ void epmapper_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_epmapper_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", &ndr_table_epmapper.syntax_id, api_epmapper_cmds, sizeof(api_epmapper_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", &ndr_table_epmapper, 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 950daa5dd1f..9a87ee648c0 100644
--- a/librpc/gen_ndr/srv_eventlog.c
+++ b/librpc/gen_ndr/srv_eventlog.c
@@ -1838,5 +1838,5 @@ void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_eventlog_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", &ndr_table_eventlog.syntax_id, api_eventlog_cmds, sizeof(api_eventlog_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", &ndr_table_eventlog, 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 dbbfaaa41a4..f0f3a7ba73d 100644
--- a/librpc/gen_ndr/srv_initshutdown.c
+++ b/librpc/gen_ndr/srv_initshutdown.c
@@ -242,5 +242,5 @@ void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_initshutdown_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", &ndr_table_initshutdown.syntax_id, api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", &ndr_table_initshutdown, 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 9d29f61e091..fe95df35ee5 100644
--- a/librpc/gen_ndr/srv_lsa.c
+++ b/librpc/gen_ndr/srv_lsa.c
@@ -6385,5 +6385,5 @@ void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_lsarpc_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", &ndr_table_lsarpc.syntax_id, api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", &ndr_table_lsarpc, 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 40ae09ebc2a..1bca23a7d27 100644
--- a/librpc/gen_ndr/srv_netlogon.c
+++ b/librpc/gen_ndr/srv_netlogon.c
@@ -3892,5 +3892,5 @@ void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_netlogon_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", &ndr_table_netlogon.syntax_id, api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", &ndr_table_netlogon, 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 38fb0bba39d..0a93723d4fd 100644
--- a/librpc/gen_ndr/srv_ntsvcs.c
+++ b/librpc/gen_ndr/srv_ntsvcs.c
@@ -4873,5 +4873,5 @@ void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_ntsvcs_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", &ndr_table_ntsvcs.syntax_id, api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", &ndr_table_ntsvcs, 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 598ec2aabf2..9bda8785e11 100644
--- a/librpc/gen_ndr/srv_samr.c
+++ b/librpc/gen_ndr/srv_samr.c
@@ -5478,5 +5478,5 @@ void samr_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_samr_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "samr", "samr", &ndr_table_samr.syntax_id, api_samr_cmds, sizeof(api_samr_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "samr", "samr", &ndr_table_samr, api_samr_cmds, sizeof(api_samr_cmds) / sizeof(struct api_struct));
}
diff --git a/librpc/gen_ndr/srv_srvsvc.c b/librpc/gen_ndr/srv_srvsvc.c
index 465d9ca31d6..501754d1d65 100644
--- a/librpc/gen_ndr/srv_srvsvc.c
+++ b/librpc/gen_ndr/srv_srvsvc.c
@@ -4192,5 +4192,5 @@ void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_srvsvc_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", &ndr_table_srvsvc.syntax_id, api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", &ndr_table_srvsvc, 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 cffbb6a268e..645864bfedf 100644
--- a/librpc/gen_ndr/srv_svcctl.c
+++ b/librpc/gen_ndr/srv_svcctl.c
@@ -3611,5 +3611,5 @@ void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_svcctl_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", &ndr_table_svcctl.syntax_id, api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", &ndr_table_svcctl, 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 a97391480ee..ebceee39451 100644
--- a/librpc/gen_ndr/srv_winreg.c
+++ b/librpc/gen_ndr/srv_winreg.c
@@ -2768,5 +2768,5 @@ void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_winreg_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", &ndr_table_winreg.syntax_id, api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", &ndr_table_winreg, 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 d74c8bc9707..015451bdee8 100644
--- a/librpc/gen_ndr/srv_wkssvc.c
+++ b/librpc/gen_ndr/srv_wkssvc.c
@@ -2408,5 +2408,5 @@ void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
NTSTATUS rpc_wkssvc_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", &ndr_table_wkssvc.syntax_id, api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct));
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", &ndr_table_wkssvc, 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 eb3cdf20cb0..05edda9acba 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -247,7 +247,7 @@ sub ParseInterface($)
pidl_hdr "NTSTATUS rpc_$if->{NAME}_init(void);";
pidl "NTSTATUS rpc_$if->{NAME}_init(void)";
pidl "{";
- pidl "\treturn rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, \"$if->{NAME}\", \"$if->{NAME}\", \&ndr_table_$if->{NAME}.syntax_id, 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_table_$if->{NAME}, 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 e65369e4210..a3791348482 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6194,6 +6194,10 @@ 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,
+ const struct api_struct *cmds, int size);
bool is_known_pipename(const char *cli_filename);
bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 03d9c5b2083..a8205eaa194 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1052,6 +1052,16 @@ NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
return NT_STATUS_OK;
}
+NTSTATUS rpc_srv_register(int version, const char *clnt,
+ const char *srv,
+ const struct ndr_interface_table *iface,
+ const struct api_struct *cmds, int size)
+{
+ return rpc_pipe_register_commands(version, clnt, srv,
+ &iface->syntax_id,
+ cmds, size);
+}
+
/**
* Is a named pipe known?
* @param[in] cli_filename The pipe name requested by the client