diff options
author | Jeremy Allison <jra@samba.org> | 2007-01-14 19:43:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:08 -0500 |
commit | 916342d04bdac47818863d64cf2118fe456210e2 (patch) | |
tree | c86fd1e1f11d973ecda479a6239cd8f2c918a83b /source3 | |
parent | c50c8d0dc31b95a98e09b1cfdd2e54e4bac336f2 (diff) | |
download | samba-916342d04bdac47818863d64cf2118fe456210e2.tar.gz samba-916342d04bdac47818863d64cf2118fe456210e2.tar.bz2 samba-916342d04bdac47818863d64cf2118fe456210e2.zip |
r20781: Fix a couple of paths found by Volker where we weren't
correctly handling deferred opens.
Jeremy.
(This used to be commit e47b79d1cef279a1de1128d114d423c1fd2b1e8d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/nttrans.c | 8 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 6 |
2 files changed, 13 insertions, 1 deletions
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); |