summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2022-02-15 20:27:24 +1100
committerVolker Lendecke <vl@samba.org>2022-02-17 18:12:51 +0000
commit98594d3328422a17b8d7b8639029910f21573cc5 (patch)
tree46849566866d6a4c852d07018af3f5691f3202c9 /source3
parent32d2584c23839efc9451a3563e891170dfc59027 (diff)
downloadsamba-98594d3328422a17b8d7b8639029910f21573cc5.tar.gz
util: Drop unused variable mask_perms
clang complains: ../../source3/smbd/posix_acls.c:2783:9: error: variable 'mask_perms' set but not used [-Werror,-Wunused-but-set-variable] mode_t mask_perms = 0; ^ That is, the variable is initialised and updated but the value is never used. This potentially points to a bug in commit f735551b9edef66b152261cf6eb2f29b7b69d65b from 2002. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 245d904f380..4cfb821fc14 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2780,7 +2780,6 @@ static bool set_canon_ace_list(files_struct *fsp,
SMB_ACL_PERMSET_T mask_permset;
SMB_ACL_TYPE_T the_acl_type = (default_ace ? SMB_ACL_TYPE_DEFAULT : SMB_ACL_TYPE_ACCESS);
bool needs_mask = False;
- mode_t mask_perms = 0;
int sret;
/* Use the psbuf that was passed in. */
@@ -2818,9 +2817,6 @@ static bool set_canon_ace_list(files_struct *fsp,
if (p_ace->type == SMB_ACL_USER || p_ace->type == SMB_ACL_GROUP) {
needs_mask = True;
- mask_perms |= p_ace->perms;
- } else if (p_ace->type == SMB_ACL_GROUP_OBJ) {
- mask_perms |= p_ace->perms;
}
/*