Skip to content

Commit 9d8d094

Browse files
cgzonespcmoore
authored andcommitted
selinux: supply missing field initializers
Please clang by supplying the missing field initializers in the secclass_map variable and sel_fill_super() function. Signed-off-by: Christian Göttsche <[email protected]> [PM: tweak subj and commit description] Signed-off-by: Paul Moore <[email protected]>
1 parent 2ef6fc9 commit 9d8d094

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

security/selinux/include/classmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const struct security_class_mapping secclass_map[] = {
179179
{ "anon_inode", { COMMON_FILE_PERMS, NULL } },
180180
{ "io_uring", { "override_creds", "sqpoll", "cmd", NULL } },
181181
{ "user_namespace", { "create", NULL } },
182-
{ NULL }
182+
/* last one */ { NULL, {} }
183183
};
184184

185185
#ifdef __KERNEL__ /* avoid this check when building host programs */

security/selinux/selinuxfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ static int sel_fill_super(struct super_block *sb, struct fs_context *fc)
20012001
[SEL_POLICY] = {"policy", &sel_policy_ops, S_IRUGO},
20022002
[SEL_VALIDATE_TRANS] = {"validatetrans", &sel_transition_ops,
20032003
S_IWUGO},
2004-
/* last one */ {""}
2004+
/* last one */ {"", NULL, 0}
20052005
};
20062006

20072007
ret = selinux_fs_info_create(sb);

0 commit comments

Comments
 (0)