summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-25 20:20:35 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 09:29:42 +0100
commit476c9d10bb5f6b8003e19e458cc8879c2078ad0a (patch)
treecc6c97a706f440ca7bb3e7cd621e28ec798e5d3a
parentd1fb02130003e5f397b52998a70bd5fb687fc06d (diff)
downloadsamba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.tar.gz
samba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.tar.bz2
samba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.zip
opendb_tdb: only file->delete_on_close == true should give DELETE_PENDING
metze (This used to be commit 5b12157e0f0f1cf6ea90503a72b56ab2032cb6e5)
-rw-r--r--source4/ntvfs/common/opendb_tdb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 9c273f9617..8b5e4850d9 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -346,12 +346,15 @@ static NTSTATUS odb_tdb_open_can_internal(struct odb_context *odb,
}
}
- if (file->delete_on_close ||
- (file->num_entries != 0 && delete_on_close)) {
+ if (file->delete_on_close) {
/* while delete on close is set, no new opens are allowed */
return NT_STATUS_DELETE_PENDING;
}
+ if (file->num_entries != 0 && delete_on_close) {
+ return NT_STATUS_SHARING_VIOLATION;
+ }
+
/* check for sharing violations */
for (i=0;i<file->num_entries;i++) {
status = share_conflict(&file->entries[i], stream_id,