summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-03 02:16:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:22 -0500
commit66d5a32d9cae13ddceb9b4710722d86cdc343043 (patch)
tree6c283c918840062c010ef49854e2b6c3e087a947
parentb9002fa1b6afd8e0f4b23d53dbbe86de52ff3035 (diff)
downloadsamba-66d5a32d9cae13ddceb9b4710722d86cdc343043.tar.gz
samba-66d5a32d9cae13ddceb9b4710722d86cdc343043.tar.bz2
samba-66d5a32d9cae13ddceb9b4710722d86cdc343043.zip
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)
-rw-r--r--source3/smbd/open.c6
1 files changed, 3 insertions, 3 deletions
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);