r21274: As we now have POSIX opens which can unlink
authorJeremy Allison <jra@samba.org>
Sun, 11 Feb 2007 04:37:56 +0000 (04:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:53 +0000 (12:17 -0500)
with other open files we may have taken
the delete code path with more than one share mode
entry - ensure we only delete once by resetting
the delete on close flag.
Jeremy.

source/smbd/close.c

index 05a45cc14fa85d91ddec6fd4f95f35c0f68c1e91..eea8fa01d50be5e59baf9a57b4ee31a731708ff9 100644 (file)
@@ -287,6 +287,15 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
                status = map_nt_error_from_unix(errno);
        }
 
+       /* As we now have POSIX opens which can unlink
+        * with other open files we may have taken
+        * this code path with more than one share mode
+        * entry - ensure we only delete once by resetting
+        * the delete on close flag. JRA.
+        */
+
+       set_delete_on_close_lck(lck, False, NULL);
+
  done:
 
        /* unbecome user. */