From 476c9d10bb5f6b8003e19e458cc8879c2078ad0a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 25 Feb 2008 20:20:35 +0100 Subject: opendb_tdb: only file->delete_on_close == true should give DELETE_PENDING metze (This used to be commit 5b12157e0f0f1cf6ea90503a72b56ab2032cb6e5) --- source4/ntvfs/common/opendb_tdb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs') 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;inum_entries;i++) { status = share_conflict(&file->entries[i], stream_id, -- cgit