[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-602-g2d50a1f

Michael Adam obnox at samba.org
Tue Apr 1 14:04:35 GMT 2008


The branch, v3-2-test has been updated
       via  2d50a1fef022023588e9963131951f8f3e4c7c23 (commit)
      from  888c2802b7bda92baae2dd0c1596f5e04bc3bfaa (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 2d50a1fef022023588e9963131951f8f3e4c7c23
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 1 12:29:12 2008 +0200

    smbd: ignore nttrans renames as w2k3 does
    
    This lets us pass the RAW-RENAME test.
    
    metze
    
    Signed-off-by: Michael Adam <obnox at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/nttrans.c |   27 +++------------------------
 1 files changed, 3 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index bc93d19..60e5464 100644
--- a/source/smbd/nttrans.c
+++ b/source/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, &current_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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list