From 1f79af0377be801e6570d2cf87b109a6fa4c69c6 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 17 Mar 2025 12:44:45 +0100 Subject: [PATCH] s3/locking: remove now unused private_options from share_mode_entry Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- source3/librpc/idl/open_files.idl | 1 - source3/locking/locking.c | 4 ++-- source3/locking/share_mode_lock.c | 5 ++--- source3/smbd/durable.c | 1 - source3/utils/status.c | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/source3/librpc/idl/open_files.idl b/source3/librpc/idl/open_files.idl index 9f1d33a60d0..f7582885ca4 100644 --- a/source3/librpc/idl/open_files.idl +++ b/source3/librpc/idl/open_files.idl @@ -36,7 +36,6 @@ interface open_files smb2_lease_key lease_key; uint32 access_mask; uint32 share_access; - uint32 private_options; timeval time; udlong share_file_id; uint32 uid; diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 505f0b5ad07..9a45424cf3d 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -436,12 +436,12 @@ char *share_mode_str(TALLOC_CTX *ctx, int num, struct file_id_buf ftmp; return talloc_asprintf(ctx, "share_mode_entry[%d]: " - "pid = %s, share_access = 0x%x, private_options = 0x%x, " + "pid = %s, share_access = 0x%x, " "access_mask = 0x%x, mid = 0x%llx, type= 0x%x, gen_id = %llu, " "uid = %u, flags = %u, file_id %s, name_hash = 0x%x", num, server_id_str_buf(e->pid, &tmp), - e->share_access, e->private_options, + e->share_access, e->access_mask, (unsigned long long)e->op_mid, e->op_type, (unsigned long long)e->share_file_id, (unsigned int)e->uid, (unsigned int)e->flags, diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index fa6cd4230e0..2baf12c7e69 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -328,13 +328,13 @@ static struct share_mode_data *share_mode_memcache_fetch( } /* - * 132 is the sizeof an ndr-encoded struct share_mode_entry_buf. + * 124 is the sizeof an ndr-encoded struct share_mode_entry_buf. * Reading/writing entries will immediately error out if this * size differs (push/pull is done without allocs). */ struct share_mode_entry_buf { - uint8_t buf[132]; + uint8_t buf[124]; }; #define SHARE_MODE_ENTRY_SIZE (sizeof(struct share_mode_entry_buf)) @@ -2072,7 +2072,6 @@ bool set_share_mode(struct share_mode_lock *lck, e = (struct share_mode_entry) { .pid = my_pid, .share_access = share_access, - .private_options = fh_get_private_options(fsp->fh), .access_mask = access_mask, .op_mid = mid, .op_type = op_type, diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c index 71cd3a01f99..8e35e32538d 100644 --- a/source3/smbd/durable.c +++ b/source3/smbd/durable.c @@ -595,7 +595,6 @@ static void vfs_default_durable_reconnect_fn(struct share_mode_lock *lck, goto fail; } - fh_set_private_options(fsp->fh, e.private_options); fsp_apply_share_entry_flags(fsp, e.flags); fsp->open_time = e.time; fsp->access_mask = e.access_mask; diff --git a/source3/utils/status.c b/source3/utils/status.c index 806168ae902..f02b75b7f54 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -264,9 +264,9 @@ static int print_share_mode(struct file_id fid, fprintf(stderr, "unknown-please report ! " "e->share_access = 0x%x, " - "e->private_options = 0x%x\n", + "e->flags = 0x%x\n", (unsigned int)e->share_access, - (unsigned int)e->private_options); + (unsigned int)e->flags); break; } } -- 2.47.3