diff options
Diffstat (limited to 'source3/rpc_server/srv_ntsvcs.c')
-rw-r--r-- | source3/rpc_server/srv_ntsvcs.c | 25 |
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)); |