From 3cbadc142c688ee7c02ea767a3c87b14949a8594 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Mon, 23 Aug 2004 21:32:45 -0700 Subject: [PATCH] [PATCH] configurable SELinux bootparam value Add configure option for setting default SELinux bootparam value. Ack'd by James Morris. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- security/selinux/Kconfig | 15 +++++++++++++++ security/selinux/hooks.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig index 8819822d8e080..5a4a7988a7a75 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig @@ -24,6 +24,21 @@ config SECURITY_SELINUX_BOOTPARAM If you are unsure how to answer this question, answer N. +config SECURITY_SELINUX_BOOTPARAM_VALUE + int "NSA SELinux boot parameter default value" + depends on SECURITY_SELINUX_BOOTPARAM + range 0 1 + default 1 + help + This option sets the default value for the kernel parameter + 'selinux', which allows SELinux to be disabled at boot. If this + option is set to 0 (zero), the SELinux kernel parameter will + default to 0, disabling SELinux at bootup. If this option is + set to 1 (one), the SELinux kernel paramater will default to 1, + enabling SELinux at bootup. + + If you are unsure how to answer this question, answer 1. + config SECURITY_SELINUX_DISABLE bool "NSA SELinux runtime disable" depends on SECURITY_SELINUX diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 587d63bd68610..7427026e2d96e 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -87,7 +87,7 @@ __setup("enforcing=", enforcing_setup); #endif #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM -int selinux_enabled = 1; +int selinux_enabled = CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE; static int __init selinux_enabled_setup(char *str) { -- 2.53.0