From dc83b956b9600b4577983e327745445b35f481c0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 1 Apr 2008 12:29:12 +0200 Subject: smbd: ignore nttrans renames as w2k3 does This lets us pass the RAW-RENAME test. metze Signed-off-by: Michael Adam (This used to be commit 2d50a1fef022023588e9963131951f8f3e4c7c23) --- source3/smbd/nttrans.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index bc93d19af3..60e546450b 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1518,7 +1518,6 @@ static void call_nt_transact_rename(connection_struct *conn, char *params = *ppparams; char *new_name = NULL; files_struct *fsp = NULL; - bool replace_if_exists = False; bool dest_has_wcard = False; NTSTATUS status; TALLOC_CTX *ctx = talloc_tos(); @@ -1529,7 +1528,6 @@ static void call_nt_transact_rename(connection_struct *conn, } fsp = file_fsp(SVAL(params, 0)); - replace_if_exists = (SVAL(params,2) & RENAME_REPLACE_IF_EXISTS) ? True : False; if (!check_fsp(conn, req, fsp, ¤t_user)) { return; } @@ -1541,32 +1539,13 @@ static void call_nt_transact_rename(connection_struct *conn, return; } - status = rename_internals(ctx, - conn, - req, - fsp->fsp_name, - new_name, - 0, - replace_if_exists, - False, - dest_has_wcard, - FILE_WRITE_ATTRIBUTES); - - if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { - /* We have re-scheduled this call. */ - return; - } - reply_nterror(req, status); - return; - } - /* - * Rename was successful. + * W2K3 ignores this request as the RAW-RENAME test + * demonstrates, so we do. */ send_nt_replies(conn, req, NT_STATUS_OK, NULL, 0, NULL, 0); - DEBUG(3,("nt transact rename from = %s, to = %s succeeded.\n", + DEBUG(3,("nt transact rename from = %s, to = %s ignored!\n", fsp->fsp_name, new_name)); return; -- cgit