Instead of indexing into the leases[] array, put the lease_db reference into
the share_mode_entry. For simplicity, put in the client guid as well. We
*might* be able to retrieve that from somewhere else, but as other smbd
processes have to look at the lease values, put in the full leases_db index
data.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
hyper op_mid;
uint16 op_type;
uint32 lease_idx;
+ GUID client_guid;
+ smb2_lease_key lease_key;
uint32 access_mask;
uint32 share_access;
uint32 private_options;
e->op_mid = mid;
e->op_type = op_type;
e->lease_idx = lease_idx;
+ if (lease_idx != UINT32_MAX) {
+ e->client_guid = lck->data->leases[lease_idx].client_guid;
+ e->lease_key = lck->data->leases[lease_idx].lease_key;
+ }
e->time.tv_sec = fsp->open_time.tv_sec;
e->time.tv_usec = fsp->open_time.tv_usec;
e->share_file_id = fsp->fh->gen_id;