summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-25 17:50:22 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 09:32:56 +0100
commitc93cf42d9fe4f1e382a762e7c1eafef0dff122c1 (patch)
treed256cbe00d3dd9d3391bca4ef8a41ea6c3cddec4 /source4/ntvfs/posix
parent7264a8b7ca5f91120dbc30fcbe8e8402f09ae883 (diff)
downloadsamba-c93cf42d9fe4f1e382a762e7c1eafef0dff122c1.tar.gz
samba-c93cf42d9fe4f1e382a762e7c1eafef0dff122c1.tar.bz2
samba-c93cf42d9fe4f1e382a762e7c1eafef0dff122c1.zip
pvfs_open: fix odb_can_open() callers after prototype change
metze (This used to be commit 904159327b3cb80fbec6aa5a4feaa141190a3f3a)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c51
1 files changed, 35 insertions, 16 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 1b5ea56d64..bbfe4ac733 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1428,6 +1428,9 @@ NTSTATUS pvfs_can_delete(struct pvfs_state *pvfs,
NTSTATUS status;
DATA_BLOB key;
struct odb_lock *lck;
+ uint32_t share_access;
+ uint32_t access_mask;
+ bool delete_on_close;
status = pvfs_locking_key(name, name, &key);
if (!NT_STATUS_IS_OK(status)) {
@@ -1440,15 +1443,18 @@ NTSTATUS pvfs_can_delete(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- status = odb_can_open(lck,
- NTCREATEX_SHARE_ACCESS_READ |
- NTCREATEX_SHARE_ACCESS_WRITE |
- NTCREATEX_SHARE_ACCESS_DELETE,
- NTCREATEX_OPTIONS_DELETE_ON_CLOSE,
- SEC_STD_DELETE);
+ share_access = NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE |
+ NTCREATEX_SHARE_ACCESS_DELETE;
+ access_mask = SEC_STD_DELETE;
+ delete_on_close = true;
+
+ status = odb_can_open(lck, name->stream_id,
+ share_access, access_mask, delete_on_close,
+ 0, false);
if (NT_STATUS_IS_OK(status)) {
- status = pvfs_access_check_simple(pvfs, req, name, SEC_STD_DELETE);
+ status = pvfs_access_check_simple(pvfs, req, name, access_mask);
}
/*
@@ -1487,6 +1493,9 @@ NTSTATUS pvfs_can_rename(struct pvfs_state *pvfs,
NTSTATUS status;
DATA_BLOB key;
struct odb_lock *lck;
+ uint32_t share_access;
+ uint32_t access_mask;
+ bool delete_on_close;
status = pvfs_locking_key(name, name, &key);
if (!NT_STATUS_IS_OK(status)) {
@@ -1499,11 +1508,14 @@ NTSTATUS pvfs_can_rename(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- status = odb_can_open(lck,
- NTCREATEX_SHARE_ACCESS_READ |
- NTCREATEX_SHARE_ACCESS_WRITE,
- 0,
- SEC_STD_DELETE);
+ share_access = NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE;
+ access_mask = SEC_STD_DELETE;
+ delete_on_close = false;
+
+ status = odb_can_open(lck, name->stream_id,
+ share_access, access_mask, delete_on_close,
+ 0, false);
/*
* if it's a sharing violation or we got no oplock
@@ -1540,6 +1552,9 @@ NTSTATUS pvfs_can_stat(struct pvfs_state *pvfs,
NTSTATUS status;
DATA_BLOB key;
struct odb_lock *lck;
+ uint32_t share_access;
+ uint32_t access_mask;
+ bool delete_on_close;
status = pvfs_locking_key(name, name, &key);
if (!NT_STATUS_IS_OK(status)) {
@@ -1552,10 +1567,14 @@ NTSTATUS pvfs_can_stat(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- status = odb_can_open(lck,
- NTCREATEX_SHARE_ACCESS_READ |
- NTCREATEX_SHARE_ACCESS_WRITE,
- 0, 0);
+ share_access = NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE;
+ access_mask = 0;
+ delete_on_close = false;
+
+ status = odb_can_open(lck, name->stream_id,
+ share_access, access_mask, delete_on_close,
+ 0, false);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(lck);