summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_ntsvcs.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-17 23:03:22 +0100
committerGünther Deschner <gd@samba.org>2008-02-17 23:03:22 +0100
commitd8fcfb161540d3cb6d64f04b82dbf9590c1d5c9b (patch)
treeb2c44c5e671c444a7da24c5508767ced58caab6f /source3/rpc_server/srv_ntsvcs.c
parent082392d975808747ce1f485e6abf3a796e7ae233 (diff)
downloadsamba-d8fcfb161540d3cb6d64f04b82dbf9590c1d5c9b.tar.gz
samba-d8fcfb161540d3cb6d64f04b82dbf9590c1d5c9b.tar.bz2
samba-d8fcfb161540d3cb6d64f04b82dbf9590c1d5c9b.zip
Build the generated ntsvcs server (not at all useable yet).
Guenther (This used to be commit acce1092d90db1f90265de44fd340d7df73e4e0e)
Diffstat (limited to 'source3/rpc_server/srv_ntsvcs.c')
-rw-r--r--source3/rpc_server/srv_ntsvcs.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_ntsvcs.c b/source3/rpc_server/srv_ntsvcs.c
index b3e93ac459..0734a60b4d 100644
--- a/source3/rpc_server/srv_ntsvcs.c
+++ b/source3/rpc_server/srv_ntsvcs.c
@@ -25,6 +25,27 @@
/*******************************************************************
********************************************************************/
+static bool proxy_ntsvcs_call(pipes_struct *p, uint8_t opnum)
+{
+ struct api_struct *fns;
+ int n_fns;
+
+ ntsvcs_get_pipe_fns(&fns, &n_fns);
+
+ if (opnum >= n_fns) {
+ return false;
+ }
+
+ if (fns[opnum].opnum != opnum) {
+ smb_panic("NTSVCS function table not sorted");
+ }
+
+ return fns[opnum].fn(p);
+}
+
+/*******************************************************************
+ ********************************************************************/
+
static bool api_ntsvcs_get_version(pipes_struct *p)
{
NTSVCS_Q_GET_VERSION q_u;
@@ -206,13 +227,13 @@ static struct api_struct api_ntsvcs_cmds[] =
};
-void ntsvcs_get_pipe_fns( struct api_struct **fns, int *n_fns )
+void ntsvcs2_get_pipe_fns( struct api_struct **fns, int *n_fns )
{
*fns = api_ntsvcs_cmds;
*n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct);
}
-NTSTATUS rpc_ntsvcs_init(void)
+NTSTATUS rpc_ntsvcs2_init(void)
{
return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", api_ntsvcs_cmds,
sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));