diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-02-25 20:20:35 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-02-26 09:29:42 +0100 |
commit | 476c9d10bb5f6b8003e19e458cc8879c2078ad0a (patch) | |
tree | cc6c97a706f440ca7bb3e7cd621e28ec798e5d3a /source4/ntvfs/common | |
parent | d1fb02130003e5f397b52998a70bd5fb687fc06d (diff) | |
download | samba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.tar.gz samba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.tar.xz samba-476c9d10bb5f6b8003e19e458cc8879c2078ad0a.zip |
opendb_tdb: only file->delete_on_close == true should give DELETE_PENDING
metze
(This used to be commit 5b12157e0f0f1cf6ea90503a72b56ab2032cb6e5)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r-- | source4/ntvfs/common/opendb_tdb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c index 9c273f9617f..8b5e4850d9d 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, |