svn commit: samba r13298 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Fri Feb 3 02:16:33 GMT 2006


Author: jra
Date: 2006-02-03 02:16:33 +0000 (Fri, 03 Feb 2006)
New Revision: 13298

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13298

Log:
>From testing W2K3 and W2K the delete on close bit seems to be always
honored (ie. the file gets deleted) for derectories when set at open
time - even though it doesn't show in the qfileinfo call. This is not
true of files.... (if anyone from the EU is listening, it's stuff like
this that makes CIFS non-documentable :-).
Jeremy.

Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===================================================================
--- trunk/source/smbd/open.c	2006-02-03 02:07:22 UTC (rev 13297)
+++ trunk/source/smbd/open.c	2006-02-03 02:16:33 UTC (rev 13298)
@@ -1965,9 +1965,9 @@
 
 	set_share_mode(lck, fsp, 0, NO_OPLOCK);
 
-	if ((create_options & FILE_DELETE_ON_CLOSE) &&
-			(info == FILE_WAS_OVERWRITTEN || info == FILE_WAS_CREATED ||
-			info == FILE_WAS_SUPERSEDED)) {
+	/* For directories the delete on close bit at open time seems
+	   always to be honored on close... See test 19 in Samba4 BASE-DELETE. */
+	if (create_options & FILE_DELETE_ON_CLOSE) {
 		status = can_set_delete_on_close(fsp, True, 0);
 		if (!NT_STATUS_IS_OK(status)) {
 			set_saved_ntstatus(status);



More information about the samba-cvs mailing list