From 916342d04bdac47818863d64cf2118fe456210e2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 14 Jan 2007 19:43:06 +0000 Subject: r20781: Fix a couple of paths found by Volker where we weren't correctly handling deferred opens. Jeremy. (This used to be commit e47b79d1cef279a1de1128d114d423c1fd2b1e8d) --- source3/smbd/nttrans.c | 8 +++++++- source3/smbd/trans2.c | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 28d7a169a8..df65ad7da6 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1853,8 +1853,14 @@ static int call_nt_transact_rename(connection_struct *conn, char *inbuf, char *o status = rename_internals(conn, fsp->fsp_name, new_name, 0, replace_if_exists, path_contains_wcard); - if (!NT_STATUS_IS_OK(status)) + + if (!NT_STATUS_IS_OK(status)) { + if (open_was_deferred(SVAL(inbuf,smb_mid))) { + /* We have re-scheduled this call. */ + return -1; + } return ERROR_NT(status); + } /* * Rename was successful. diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7bdecd45ca..48a5a0c1ac 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4459,9 +4459,15 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", fname, newname )); status = rename_internals(conn, fname, base_name, 0, overwrite, False); } + if (!NT_STATUS_IS_OK(status)) { + if (open_was_deferred(SVAL(inbuf,smb_mid))) { + /* We have re-scheduled this call. */ + return -1; + } return ERROR_NT(status); } + process_pending_change_notify_queue((time_t)0); SSVAL(params,0,0); send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0, max_data_bytes); -- cgit