git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1fb021
)
opendb_tdb: only file->delete_on_close == true should give DELETE_PENDING
author
Stefan Metzmacher
<metze@samba.org>
Mon, 25 Feb 2008 19:20:35 +0000
(20:20 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 26 Feb 2008 08:29:42 +0000
(09:29 +0100)
metze
(This used to be commit
5b12157e0f0f1cf6ea90503a72b56ab2032cb6e5
)
source4/ntvfs/common/opendb_tdb.c
patch
|
blob
|
history
diff --git
a/source4/ntvfs/common/opendb_tdb.c
b/source4/ntvfs/common/opendb_tdb.c
index 9c273f9617f08045b9730deb2dac0a99d1dabbb0..8b5e4850d9d0c4cfb9c629c1b3ad775a0f716045 100644
(file)
--- 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,