diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-03 02:16:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2006-02-03 02:16:35 +0000 |
commit | ff072c8dce4788a83fe206f5c7caab2a20a62eb6 (patch) | |
tree | 0689d816331229ee3f05dd1539b2d0f1af9389f9 /source/smbd/open.c | |
parent | 4f7ee0f70f2f380d35286817be84561bf7e42c4c (diff) | |
download | samba-ff072c8dce4788a83fe206f5c7caab2a20a62eb6.tar.gz samba-ff072c8dce4788a83fe206f5c7caab2a20a62eb6.tar.xz samba-ff072c8dce4788a83fe206f5c7caab2a20a62eb6.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.
Diffstat (limited to 'source/smbd/open.c')
-rw-r--r-- | source/smbd/open.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c index 15e814aae3c..f75bc55b46c 100644 --- a/source/smbd/open.c +++ b/source/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); |