summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-05-28 16:49:23 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-28 19:52:00 +0200
commit69fd1bb66e757212f8866db23f95626fb9d1c573 (patch)
tree24fa09dfa310ca02e3a94451b358bc022e10f4e3 /source3
parentabf566ca994b8e2b47ab3da69cde67568bca8d71 (diff)
downloadsamba-69fd1bb66e757212f8866db23f95626fb9d1c573.tar.gz
samba-69fd1bb66e757212f8866db23f95626fb9d1c573.tar.bz2
samba-69fd1bb66e757212f8866db23f95626fb9d1c573.zip
s3:rpc_server: don't do any magic in is_known_pipename() anymore
The callers have to check if they allow something else than the raw pipe file name. If we allow more than windows allows, we risks Samba specific client behavior. E.g. winbindd only works against Samba servers. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_pipe.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 0bc48b1a06..a870ec14fe 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -376,22 +376,13 @@ static bool check_bind_req(struct pipes_struct *p,
/**
* Is a named pipe known?
- * @param[in] cli_filename The pipe name requested by the client
+ * @param[in] pipename Just the filename
* @result Do we want to serve this?
*/
-bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax)
+bool is_known_pipename(const char *pipename, struct ndr_syntax_id *syntax)
{
- const char *pipename = cli_filename;
NTSTATUS status;
- if (strnequal(pipename, "\\PIPE\\", 6)) {
- pipename += 5;
- }
-
- if (*pipename == '\\') {
- pipename += 1;
- }
-
if (lp_disable_spoolss() && strequal(pipename, "spoolss")) {
DEBUG(10, ("refusing spoolss access\n"));
return false;
@@ -403,7 +394,7 @@ bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax)
status = smb_probe_module("rpc", pipename);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("is_known_pipename: %s unknown\n", cli_filename));
+ DEBUG(10, ("is_known_pipename: %s unknown\n", pipename));
return false;
}
DEBUG(10, ("is_known_pipename: %s loaded dynamically\n", pipename));