diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-03-07 18:23:34 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-03-07 19:35:12 +0100 |
commit | e5e799aeb6b57ade1dd9c1a1d2c3aab1ad08d6df (patch) | |
tree | bece52c1b8e9c1f3f1d1360917ad439d990290c5 /source4/ntvfs/common/opendb.c | |
parent | 75a412a46975754e75679f5d072e6ce688fee894 (diff) | |
download | samba-e5e799aeb6b57ade1dd9c1a1d2c3aab1ad08d6df.tar.gz samba-e5e799aeb6b57ade1dd9c1a1d2c3aab1ad08d6df.tar.bz2 samba-e5e799aeb6b57ade1dd9c1a1d2c3aab1ad08d6df.zip |
opendb: force odb_can_open() before odb_open_file()
Now there's only odb_can_open() which handles the
share_access rules.
And odb_open_file() only adds the new opendb_entry into the
database and calculates the granted oplock level.
metze
(This used to be commit db0853ae4fead34ef382bbfcfe2f46453ab8b73b)
Diffstat (limited to 'source4/ntvfs/common/opendb.c')
-rw-r--r-- | source4/ntvfs/common/opendb.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c index a7e5458aaf..1cc077137c 100644 --- a/source4/ntvfs/common/opendb.c +++ b/source4/ntvfs/common/opendb.c @@ -87,23 +87,21 @@ _PUBLIC_ DATA_BLOB odb_get_key(TALLOC_CTX *mem_ctx, struct odb_lock *lck) } /* - register an open file in the open files database. This implements the share_access - rules + register an open file in the open files database. + The share_access rules are implemented by odb_can_open() + and it's needed to call odb_can_open() before + odb_open_file() otherwise NT_STATUS_INTERNAL_ERROR is returned Note that the path is only used by the delete on close logic, not for comparing with other filenames */ _PUBLIC_ NTSTATUS odb_open_file(struct odb_lock *lck, void *file_handle, const char *path, - uint32_t stream_id, uint32_t share_access, - uint32_t access_mask, bool delete_on_close, - uint32_t open_disposition, bool break_to_none, bool allow_level_II_oplock, uint32_t oplock_level, uint32_t *oplock_granted) { - return ops->odb_open_file(lck, file_handle, path, stream_id, share_access, - access_mask, delete_on_close, open_disposition, - break_to_none, allow_level_II_oplock, + return ops->odb_open_file(lck, file_handle, path, + allow_level_II_oplock, oplock_level, oplock_granted); } |