[Samba] 2.2.1a / 2.2.2 bug is back in 2.2.8

jra at dp.samba.org jra at dp.samba.org
Fri Apr 4 21:56:13 GMT 2003


On Fri, Apr 04, 2003 at 02:16:59PM -0600, Tom Schaefer wrote:
> Hello,
> 
> Back when 2.2.2 was the current samba release I came across the following problem when deleting folders in Windows 2000 which I'll repost again below.  After I finally got his attention with a few very wordy messages to the samba mailing list, Jeremy fixed it blazingly fast and wrote me back:

Here is the fix. The problem re-occurred due to the re-write of the delete on
close code in 2.2.8 to correctly match Win2k semantics. I forgot to check the
type of the fsp in seeting the flag.

Sorry for the bug,

	Jeremy.

Index: smbd/close.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/close.c,v
retrieving revision 1.22.4.20
diff -u -r1.22.4.20 close.c
--- smbd/close.c        11 Feb 2003 02:20:34 -0000      1.22.4.20
+++ smbd/close.c        4 Apr 2003 21:53:15 -0000
@@ -198,6 +198,7 @@
                        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);
@@ -264,6 +265,7 @@

                if(ok)
                        remove_pending_change_notify_requests_by_filename(fsp);
+               process_pending_change_notify_queue((time_t)0);
        }

        /*
Index: smbd/trans2.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/trans2.c,v
retrieving revision 1.149.4.99
diff -u -r1.149.4.99 trans2.c
--- smbd/trans2.c       25 Mar 2003 23:50:47 -0000      1.149.4.99
+++ smbd/trans2.c       4 Apr 2003 21:53:16 -0000
@@ -2208,6 +2208,9 @@
        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;



More information about the samba-technical mailing list