summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-01 12:29:12 +0200
committerMichael Adam <obnox@samba.org>2008-04-01 15:25:47 +0200
commitdc83b956b9600b4577983e327745445b35f481c0 (patch)
tree2125cb20f03104e7c1db759f8659111269b9d3fe
parent7704d4fb58161577aaa7f14075bbf7e9fc964e9b (diff)
downloadsamba-dc83b956b9600b4577983e327745445b35f481c0.tar.gz
samba-dc83b956b9600b4577983e327745445b35f481c0.tar.bz2
samba-dc83b956b9600b4577983e327745445b35f481c0.zip
smbd: ignore nttrans renames as w2k3 does
This lets us pass the RAW-RENAME test. metze Signed-off-by: Michael Adam <obnox@samba.org> (This used to be commit 2d50a1fef022023588e9963131951f8f3e4c7c23)
-rw-r--r--source3/smbd/nttrans.c27
1 files changed, 3 insertions, 24 deletions
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, &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;