From 69fd1bb66e757212f8866db23f95626fb9d1c573 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 May 2012 16:49:23 +0200 Subject: 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 --- source3/rpc_server/srv_pipe.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'source3/rpc_server/srv_pipe.c') 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)); -- cgit