diff options
| author | Ingo Molnar <mingo@kernel.org> | 2020-04-25 10:25:02 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2020-04-25 10:25:02 +0200 |
| commit | 4353dd3b70783ebbc83fcf12d9c0af3fbab0223b (patch) | |
| tree | aa84823fc1d4edfb4a9bbbe8bb6c2c9ea07939aa /scripts/selinux/genheaders/genheaders.c | |
| parent | 594e576d4b93b8cda3247542366b47e1b2ddc4dc (diff) | |
| parent | 4eb8320bd1aaa7e69d039f2c251735e3ef0b9a38 (diff) | |
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core
Pull EFI changes for v5.8 from Ard Biesheuvel:
"- preliminary changes for RISC-V
- add support for setting the resolution on the EFI framebuffer
- simplify kernel image loading for arm64
- Move .bss into .data via the linker script instead of relying on symbol
annotations.
- Get rid of __pure getters to access global variables
- Clean up the config table matching arrays"
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/selinux/genheaders/genheaders.c')
| -rw-r--r-- | scripts/selinux/genheaders/genheaders.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index 544ca126a8a8..f355b3e0e968 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c @@ -67,8 +67,12 @@ int main(int argc, char *argv[]) } isids_len = sizeof(initial_sid_to_string) / sizeof (char *); - for (i = 1; i < isids_len; i++) - initial_sid_to_string[i] = stoupperx(initial_sid_to_string[i]); + for (i = 1; i < isids_len; i++) { + const char *s = initial_sid_to_string[i]; + + if (s) + initial_sid_to_string[i] = stoupperx(s); + } fprintf(fout, "/* This file is automatically generated. Do not edit. */\n"); fprintf(fout, "#ifndef _SELINUX_FLASK_H_\n#define _SELINUX_FLASK_H_\n\n"); @@ -82,7 +86,8 @@ int main(int argc, char *argv[]) for (i = 1; i < isids_len; i++) { const char *s = initial_sid_to_string[i]; - fprintf(fout, "#define SECINITSID_%-39s %2d\n", s, i); + if (s) + fprintf(fout, "#define SECINITSID_%-39s %2d\n", s, i); } fprintf(fout, "\n#define SECINITSID_NUM %d\n", i-1); fprintf(fout, "\nstatic inline bool security_is_socket_class(u16 kern_tclass)\n"); |
