summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-07-25 15:01:37 +0200
committerJeremy Allison <jra@samba.org>2019-08-06 21:49:29 +0000
commit41ab2b8ec5d398ef6187562c7620c359837f3899 (patch)
tree3658307c7bfc05d91d386f619afa823352634bec /source3/locking
parent1d9970735ced7adae24f4926a4eeed902d132426 (diff)
downloadsamba-41ab2b8ec5d398ef6187562c7620c359837f3899.tar.gz
smbd: Pass share_access/access_mask explicitly to set_share_mode()
Makes the interface more obvious to me. Also, I want to remove fsp->share_access, which is not really used anywhere after the fsp has been fully established. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c6
-rw-r--r--source3/locking/proto.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index d87a882d14f..45399b65f1f 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -794,6 +794,8 @@ bool set_share_mode(struct share_mode_lock *lck,
uid_t uid,
uint64_t mid,
uint16_t op_type,
+ uint32_t share_access,
+ uint32_t access_mask,
const struct GUID *client_guid,
const struct smb2_lease_key *lease_key)
{
@@ -812,9 +814,9 @@ bool set_share_mode(struct share_mode_lock *lck,
ZERO_STRUCTP(e);
e->pid = messaging_server_id(fsp->conn->sconn->msg_ctx);
- e->share_access = fsp->share_access;
+ e->share_access = share_access;
e->private_options = fsp->fh->private_options;
- e->access_mask = fsp->access_mask;
+ e->access_mask = access_mask;
e->op_mid = mid;
e->op_type = op_type;
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index 3a086fa0516..3eb928ab12e 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -160,6 +160,8 @@ bool set_share_mode(struct share_mode_lock *lck,
uid_t uid,
uint64_t mid,
uint16_t op_type,
+ uint32_t share_access,
+ uint32_t access_mask,
const struct GUID *client_guid,
const struct smb2_lease_key *lease_key);
void remove_stale_share_mode_entries(struct share_mode_data *d);