summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-03-19 18:45:19 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-03-19 18:45:19 +0000
commit47ea3a2bf242a446f658f1573ec5d3ea533333f0 (patch)
treee541097b7374b3cecd72e2ed8e011c9cec9e3a18 /source3/rpc_server
parent45df237d13316a1ec2074aec5023973b7681d860 (diff)
downloadsamba-47ea3a2bf242a446f658f1573ec5d3ea533333f0.tar.gz
samba-47ea3a2bf242a446f658f1573ec5d3ea533333f0.tar.xz
samba-47ea3a2bf242a446f658f1573ec5d3ea533333f0.zip
Put in the new modules system. It's now used by passdb and rpc. I will
put a doc about it in dev-doc later today. (This used to be commit af7bfee0c6902c07fdb8d3abccf4c8d6bab00b5a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_dfs.c4
-rw-r--r--source3/rpc_server/srv_lsa.c4
-rw-r--r--source3/rpc_server/srv_netlog.c4
-rw-r--r--source3/rpc_server/srv_pipe.c77
-rw-r--r--source3/rpc_server/srv_reg.c4
-rw-r--r--source3/rpc_server/srv_samr.c4
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c4
-rw-r--r--source3/rpc_server/srv_srvsvc.c4
-rw-r--r--source3/rpc_server/srv_wkssvc.c4
9 files changed, 2 insertions, 107 deletions
diff --git a/source3/rpc_server/srv_dfs.c b/source3/rpc_server/srv_dfs.c
index 14c1cb4088e..0807efd550c 100644
--- a/source3/rpc_server/srv_dfs.c
+++ b/source3/rpc_server/srv_dfs.c
@@ -158,11 +158,7 @@ static BOOL api_dfs_enum(pipes_struct *p)
\pipe\netdfs commands
********************************************************************/
-#ifdef RPC_DFS_DYNAMIC
-int init_module(void)
-#else
int rpc_dfs_init(void)
-#endif
{
struct api_struct api_netdfs_cmds[] =
{
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index 0e4039326b6..bfa706acf24 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -771,11 +771,7 @@ static BOOL api_lsa_remove_acct_rights(pipes_struct *p)
\PIPE\ntlsa commands
***************************************************************************/
-#ifdef RPC_LSA_DYNAMIC
-int init_module(void)
-#else
int rpc_lsa_init(void)
-#endif
{
static const struct api_struct api_lsa_cmds[] =
{
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index c9e4fc1b1f6..7dc0f57f34f 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -321,11 +321,7 @@ static BOOL api_net_logon_ctrl(pipes_struct *p)
array of \PIPE\NETLOGON operations
********************************************************************/
-#ifdef RPC_NETLOG_DYNAMIC
-int init_module(void)
-#else
int rpc_net_init(void)
-#endif
{
static struct api_struct api_net_cmds [] =
{
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index f6deac68f82..d6b774c5663 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -454,41 +454,6 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name ));
The switch table for the pipe names and the functions to handle them.
*******************************************************************/
-struct api_cmd
-{
- const char *name;
- int (*init)(void);
-};
-
-static struct api_cmd api_fd_commands[] =
-{
-#ifndef RPC_LSA_DYNAMIC
- { "lsarpc", rpc_lsa_init },
-#endif
-#ifndef RPC_SAMR_DYNAMIC
- { "samr", rpc_samr_init },
-#endif
-#ifndef RPC_SVC_DYNAMIC
- { "srvsvc", rpc_srv_init },
-#endif
-#ifndef RPC_WKS_DYNAMIC
- { "wkssvc", rpc_wks_init },
-#endif
-#ifndef RPC_NETLOG_DYNAMIC
- { "NETLOGON", rpc_net_init },
-#endif
-#ifndef RPC_REG_DYNAMIC
- { "winreg", rpc_reg_init },
-#endif
-#ifndef RPC_SPOOLSS_DYNAMIC
- { "spoolss", rpc_spoolss_init },
-#endif
-#ifndef RPC_DFS_DYNAMIC
- { "netdfs", rpc_dfs_init },
-#endif
- { NULL, NULL }
-};
-
struct rpc_table
{
struct
@@ -792,28 +757,6 @@ int rpc_pipe_register_commands(const char *clnt, const char *srv, const struct a
}
/*******************************************************************
- Register commands to an RPC pipe
-*******************************************************************/
-int rpc_load_module(const char *module)
-{
- pstring full_path;
- int status;
-
- pstrcpy(full_path, lib_path("rpc"));
- pstrcat(full_path, "/librpc_");
- pstrcat(full_path, module);
- pstrcat(full_path, ".");
- pstrcat(full_path, shlib_ext());
-
- if (!(status = smb_load_module(full_path))) {
- DEBUG(0, ("Could not load requested pipe %s as %s\n",
- module, full_path));
- }
-
- return status;
-}
-
-/*******************************************************************
Respond to a pipe bind request.
*******************************************************************/
@@ -851,14 +794,7 @@ BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
}
if (i == rpc_lookup_size) {
- for (i = 0; api_fd_commands[i].name; i++) {
- if (strequal(api_fd_commands[i].name, p->name)) {
- api_fd_commands[i].init();
- break;
- }
- }
-
- if (!api_fd_commands[i].name && !rpc_load_module(p->name)) {
+ if (!smb_probe_module("rpc", p->name)) {
DEBUG(3,("api_pipe_bind_req: Unknown pipe name %s in bind request.\n",
p->name ));
if(!setup_bind_nak(p))
@@ -1273,16 +1209,7 @@ BOOL api_pipe_request(pipes_struct *p)
if (i == rpc_lookup_size) {
- for (i = 0; api_fd_commands[i].name; i++) {
- if (strequal(api_fd_commands[i].name, p->name)) {
- api_fd_commands[i].init();
- break;
- }
- }
-
- if (!api_fd_commands[i].name) {
- rpc_load_module(p->name);
- }
+ smb_probe_module("rpc", p->name);
for (i = 0; i < rpc_lookup_size; i++) {
if (strequal(rpc_lookup[i].pipe.clnt, p->name)) {
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index 8fc1d42b2fb..f72d8e4f295 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -373,11 +373,7 @@ static BOOL api_reg_save_key(pipes_struct *p)
array of \PIPE\reg operations
********************************************************************/
-#ifdef RPC_REG_DYNAMIC
-int init_module(void)
-#else
int rpc_reg_init(void)
-#endif
{
static struct api_struct api_reg_cmds[] =
{
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index b75195ceefd..67c092775b9 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -1443,11 +1443,7 @@ static BOOL api_samr_set_dom_info(pipes_struct *p)
array of \PIPE\samr operations
********************************************************************/
-#ifdef RPC_SAMR_DYNAMIC
-int init_module(void)
-#else
int rpc_samr_init(void)
-#endif
{
static struct api_struct api_samr_cmds [] =
{
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 3023922a5b3..a7dd7a6cef5 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -1580,11 +1580,7 @@ static BOOL api_spoolss_replycloseprinter(pipes_struct *p)
\pipe\spoolss commands
********************************************************************/
-#ifdef RPC_SPOOLSS_DYNAMIC
-int init_module(void)
-#else
int rpc_spoolss_init(void)
-#endif
{
struct api_struct api_spoolss_cmds[] =
{
diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c
index 7c5e317c877..96820ae74bc 100644
--- a/source3/rpc_server/srv_srvsvc.c
+++ b/source3/rpc_server/srv_srvsvc.c
@@ -526,11 +526,7 @@ static BOOL api_srv_net_file_set_secdesc(pipes_struct *p)
\PIPE\srvsvc commands
********************************************************************/
-#ifdef RPC_SVC_DYNAMIC
-int init_module(void)
-#else
int rpc_srv_init(void)
-#endif
{
static const struct api_struct api_srv_cmds[] =
{
diff --git a/source3/rpc_server/srv_wkssvc.c b/source3/rpc_server/srv_wkssvc.c
index e0d662ea801..ddcbadd1d44 100644
--- a/source3/rpc_server/srv_wkssvc.c
+++ b/source3/rpc_server/srv_wkssvc.c
@@ -60,11 +60,7 @@ static BOOL api_wks_query_info(pipes_struct *p)
\PIPE\wkssvc commands
********************************************************************/
-#ifdef RPC_WKS_DYNAMIC
-int init_module(void)
-#else
int rpc_wks_init(void)
-#endif
{
static struct api_struct api_wks_cmds[] =
{