From d5f235912fe5802a0698f0b56328a9a3b5f903fc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Apr 2003 21:58:55 +0000 Subject: Re-fix regression noticed by Tom Schaefer due to correct delete on close semantics change. Jeremy. (This used to be commit 7a45b45490e6001c17fc89aabfa802f76fa3fe5e) --- source3/smbd/close.c | 2 ++ source3/smbd/trans2.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 4798d62db8..9cb191c4e2 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -196,6 +196,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) DEBUG(5,("close_file: file %s. Delete on close was set and unlink failed \ with error %s\n", fsp->fsp_name, strerror(errno) )); } + process_pending_change_notify_queue((time_t)0); } unlock_share_entry_fsp(fsp); @@ -262,6 +263,7 @@ static int close_directory(files_struct *fsp, BOOL normal_close) if(ok) remove_pending_change_notify_requests_by_filename(fsp); + process_pending_change_notify_queue((time_t)0); } /* diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 4129852f77..7b8b7e3a4f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2130,6 +2130,9 @@ NTSTATUS set_delete_on_close_over_all(files_struct *fsp, BOOL delete_on_close) DEBUG(10,("set_delete_on_close_over_all: %s delete on close flag for fnum = %d, file %s\n", delete_on_close ? "Adding" : "Removing", fsp->fnum, fsp->fsp_name )); + if (fsp->is_directory || fsp->is_stat) + return NT_STATUS_OK; + if (lock_share_entry_fsp(fsp) == False) return NT_STATUS_ACCESS_DENIED; -- cgit