From 66d5a32d9cae13ddceb9b4710722d86cdc343043 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 3 Feb 2006 02:16:35 +0000 Subject: r13299: 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. (This used to be commit e2fc8a196a06f76aa47fabc30872c701a2f7ccec) --- source3/smbd/open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 15e814aae3..f75bc55b46 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1973,9 +1973,9 @@ files_struct *open_directory(connection_struct *conn, 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); -- cgit