summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-10-03 15:33:12 +0200
committerVolker Lendecke <vl@samba.org>2009-10-13 20:34:25 +0200
commitf3869f90f5efeabd404cc0c61f41cc5fcaeefc61 (patch)
tree2ed228f6ed781dfbc87cf8034ef8c557917b1650 /source3/rpc_server
parent1341d4509c715ab115425698c82e05ad4fc9f5f8 (diff)
downloadsamba-f3869f90f5efeabd404cc0c61f41cc5fcaeefc61.tar.gz
samba-f3869f90f5efeabd404cc0c61f41cc5fcaeefc61.tar.bz2
samba-f3869f90f5efeabd404cc0c61f41cc5fcaeefc61.zip
s3:rpc: Fix is_known_pipename for dynamically loaded pipes
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 8611be49e3..a246b6db50 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1092,6 +1092,7 @@ bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax)
{
const char *pipename = cli_filename;
int i;
+ NTSTATUS status;
if (strnequal(pipename, "\\PIPE\\", 6)) {
pipename += 5;
@@ -1113,7 +1114,27 @@ bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax)
}
}
- DEBUG(10, ("is_known_pipename: %s unknown\n", cli_filename));
+ status = smb_probe_module("rpc", pipename);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(10, ("is_known_pipename: %s unknown\n", cli_filename));
+ return false;
+ }
+ DEBUG(10, ("is_known_pipename: %s loaded dynamically\n", pipename));
+
+ /*
+ * Scan the list again for the interface id
+ */
+
+ for (i=0; i<rpc_lookup_size; i++) {
+ if (strequal(pipename, rpc_lookup[i].pipe.clnt)) {
+ *syntax = rpc_lookup[i].rpc_interface;
+ return true;
+ }
+ }
+
+ DEBUG(10, ("is_known_pipename: pipe %s did not register itself!\n",
+ pipename));
+
return false;
}