]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selinux: supply missing field initializers
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 16 Dec 2024 16:39:59 +0000 (17:39 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 8 Jan 2025 04:14:37 +0000 (23:14 -0500)
Please clang by supplying the missing field initializers in the
secclass_map variable and sel_fill_super() function.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: tweak subj and commit description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/include/classmap.h
security/selinux/selinuxfs.c

index 2bc20135324a083aa9a933428428495752415cb3..03e82477dce97faa42bff3369dc838f6796d5491 100644 (file)
@@ -179,7 +179,7 @@ const struct security_class_mapping secclass_map[] = {
        { "anon_inode", { COMMON_FILE_PERMS, NULL } },
        { "io_uring", { "override_creds", "sqpoll", "cmd", NULL } },
        { "user_namespace", { "create", NULL } },
-       { NULL }
+       /* last one */ { NULL, {} }
 };
 
 #ifdef __KERNEL__ /* avoid this check when building host programs */
index 1efb9a57d1812c71d35f0adefd9c998864f39a7b..47480eb2189b393588a4a9fcb4b6314febe56493 100644 (file)
@@ -2001,7 +2001,7 @@ static int sel_fill_super(struct super_block *sb, struct fs_context *fc)
                [SEL_POLICY] = {"policy", &sel_policy_ops, S_IRUGO},
                [SEL_VALIDATE_TRANS] = {"validatetrans", &sel_transition_ops,
                                        S_IWUGO},
-               /* last one */ {""}
+               /* last one */ {"", NULL, 0}
        };
 
        ret = selinux_fs_info_create(sb);