summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,