@@ -64,12 +64,11 @@ static const struct landlock_ruleset *get_current_net_domain(void)
64
64
static int current_check_access_socket (struct socket * const sock ,
65
65
struct sockaddr * const address ,
66
66
const int addrlen ,
67
- const access_mask_t access_request )
67
+ access_mask_t access_request )
68
68
{
69
69
__be16 port ;
70
70
layer_mask_t layer_masks [LANDLOCK_NUM_ACCESS_NET ] = {};
71
71
const struct landlock_rule * rule ;
72
- access_mask_t handled_access ;
73
72
struct landlock_id id = {
74
73
.type = LANDLOCK_KEY_NET_PORT ,
75
74
};
@@ -164,9 +163,9 @@ static int current_check_access_socket(struct socket *const sock,
164
163
BUILD_BUG_ON (sizeof (port ) > sizeof (id .key .data ));
165
164
166
165
rule = landlock_find_rule (dom , id );
167
- handled_access = landlock_init_layer_masks (
166
+ access_request = landlock_init_layer_masks (
168
167
dom , access_request , & layer_masks , LANDLOCK_KEY_NET_PORT );
169
- if (landlock_unmask_layers (rule , handled_access , & layer_masks ,
168
+ if (landlock_unmask_layers (rule , access_request , & layer_masks ,
170
169
ARRAY_SIZE (layer_masks )))
171
170
return 0 ;
172
171
0 commit comments