xref: /linux/security/selinux/Kconfig (revision 2a35d196c160e352fa56eabb7952f78f4c85f577)
11da177e4SLinus Torvaldsconfig SECURITY_SELINUX
21da177e4SLinus Torvalds	bool "NSA SELinux Support"
399f6d61bSStephen Smalley	depends on SECURITY_NETWORK && AUDIT && NET && INET
44e5ab4cbSJames Morris	select NETWORK_SECMARK
51da177e4SLinus Torvalds	default n
61da177e4SLinus Torvalds	help
71da177e4SLinus Torvalds	  This selects NSA Security-Enhanced Linux (SELinux).
81da177e4SLinus Torvalds	  You will also need a policy configuration and a labeled filesystem.
91da177e4SLinus Torvalds	  If you are unsure how to answer this question, answer N.
101da177e4SLinus Torvalds
111da177e4SLinus Torvaldsconfig SECURITY_SELINUX_BOOTPARAM
121da177e4SLinus Torvalds	bool "NSA SELinux boot parameter"
131da177e4SLinus Torvalds	depends on SECURITY_SELINUX
141da177e4SLinus Torvalds	default n
151da177e4SLinus Torvalds	help
161da177e4SLinus Torvalds	  This option adds a kernel parameter 'selinux', which allows SELinux
171da177e4SLinus Torvalds	  to be disabled at boot.  If this option is selected, SELinux
181da177e4SLinus Torvalds	  functionality can be disabled with selinux=0 on the kernel
191da177e4SLinus Torvalds	  command line.  The purpose of this option is to allow a single
201da177e4SLinus Torvalds	  kernel image to be distributed with SELinux built in, but not
211da177e4SLinus Torvalds	  necessarily enabled.
221da177e4SLinus Torvalds
231da177e4SLinus Torvalds	  If you are unsure how to answer this question, answer N.
241da177e4SLinus Torvalds
251da177e4SLinus Torvaldsconfig SECURITY_SELINUX_BOOTPARAM_VALUE
261da177e4SLinus Torvalds	int "NSA SELinux boot parameter default value"
271da177e4SLinus Torvalds	depends on SECURITY_SELINUX_BOOTPARAM
281da177e4SLinus Torvalds	range 0 1
291da177e4SLinus Torvalds	default 1
301da177e4SLinus Torvalds	help
311da177e4SLinus Torvalds	  This option sets the default value for the kernel parameter
321da177e4SLinus Torvalds	  'selinux', which allows SELinux to be disabled at boot.  If this
331da177e4SLinus Torvalds	  option is set to 0 (zero), the SELinux kernel parameter will
341da177e4SLinus Torvalds	  default to 0, disabling SELinux at bootup.  If this option is
351da177e4SLinus Torvalds	  set to 1 (one), the SELinux kernel parameter will default to 1,
361da177e4SLinus Torvalds	  enabling SELinux at bootup.
371da177e4SLinus Torvalds
381da177e4SLinus Torvalds	  If you are unsure how to answer this question, answer 1.
391da177e4SLinus Torvalds
401da177e4SLinus Torvaldsconfig SECURITY_SELINUX_DISABLE
411da177e4SLinus Torvalds	bool "NSA SELinux runtime disable"
421da177e4SLinus Torvalds	depends on SECURITY_SELINUX
431da177e4SLinus Torvalds	default n
441da177e4SLinus Torvalds	help
451da177e4SLinus Torvalds	  This option enables writing to a selinuxfs node 'disable', which
461da177e4SLinus Torvalds	  allows SELinux to be disabled at runtime prior to the policy load.
471da177e4SLinus Torvalds	  SELinux will then remain disabled until the next boot.
481da177e4SLinus Torvalds	  This option is similar to the selinux=0 boot parameter, but is to
491da177e4SLinus Torvalds	  support runtime disabling of SELinux, e.g. from /sbin/init, for
501da177e4SLinus Torvalds	  portability across platforms where boot parameters are difficult
511da177e4SLinus Torvalds	  to employ.
521da177e4SLinus Torvalds
531da177e4SLinus Torvalds	  If you are unsure how to answer this question, answer N.
541da177e4SLinus Torvalds
551da177e4SLinus Torvaldsconfig SECURITY_SELINUX_DEVELOP
561da177e4SLinus Torvalds	bool "NSA SELinux Development Support"
571da177e4SLinus Torvalds	depends on SECURITY_SELINUX
581da177e4SLinus Torvalds	default y
591da177e4SLinus Torvalds	help
601da177e4SLinus Torvalds	  This enables the development support option of NSA SELinux,
611da177e4SLinus Torvalds	  which is useful for experimenting with SELinux and developing
621da177e4SLinus Torvalds	  policies.  If unsure, say Y.  With this option enabled, the
631da177e4SLinus Torvalds	  kernel will start in permissive mode (log everything, deny nothing)
641da177e4SLinus Torvalds	  unless you specify enforcing=1 on the kernel command line.  You
651da177e4SLinus Torvalds	  can interactively toggle the kernel between enforcing mode and
661da177e4SLinus Torvalds	  permissive mode (if permitted by the policy) via /selinux/enforce.
671da177e4SLinus Torvalds
681da177e4SLinus Torvaldsconfig SECURITY_SELINUX_AVC_STATS
691da177e4SLinus Torvalds	bool "NSA SELinux AVC Statistics"
701da177e4SLinus Torvalds	depends on SECURITY_SELINUX
711da177e4SLinus Torvalds	default y
721da177e4SLinus Torvalds	help
731da177e4SLinus Torvalds	  This option collects access vector cache statistics to
741da177e4SLinus Torvalds	  /selinux/avc/cache_stats, which may be monitored via
751da177e4SLinus Torvalds	  tools such as avcstat.
761da177e4SLinus Torvalds
771da177e4SLinus Torvaldsconfig SECURITY_SELINUX_CHECKREQPROT_VALUE
781da177e4SLinus Torvalds	int "NSA SELinux checkreqprot default value"
791da177e4SLinus Torvalds	depends on SECURITY_SELINUX
801da177e4SLinus Torvalds	range 0 1
81*2a35d196SPaul Moore	default 0
821da177e4SLinus Torvalds	help
831da177e4SLinus Torvalds	  This option sets the default value for the 'checkreqprot' flag
841da177e4SLinus Torvalds	  that determines whether SELinux checks the protection requested
851da177e4SLinus Torvalds	  by the application or the protection that will be applied by the
861da177e4SLinus Torvalds	  kernel (including any implied execute for read-implies-exec) for
871da177e4SLinus Torvalds	  mmap and mprotect calls.  If this option is set to 0 (zero),
881da177e4SLinus Torvalds	  SELinux will default to checking the protection that will be applied
891da177e4SLinus Torvalds	  by the kernel.  If this option is set to 1 (one), SELinux will
901da177e4SLinus Torvalds	  default to checking the protection requested by the application.
911da177e4SLinus Torvalds	  The checkreqprot flag may be changed from the default via the
921da177e4SLinus Torvalds	  'checkreqprot=' boot parameter.  It may also be changed at runtime
931da177e4SLinus Torvalds	  via /selinux/checkreqprot if authorized by policy.
941da177e4SLinus Torvalds
95*2a35d196SPaul Moore	  If you are unsure how to answer this question, answer 0.
964e5ab4cbSJames Morris
97016b9bdbSStephen Smalleyconfig SECURITY_SELINUX_POLICYDB_VERSION_MAX
98016b9bdbSStephen Smalley	bool "NSA SELinux maximum supported policy format version"
99016b9bdbSStephen Smalley	depends on SECURITY_SELINUX
100016b9bdbSStephen Smalley	default n
101016b9bdbSStephen Smalley	help
102016b9bdbSStephen Smalley	  This option enables the maximum policy format version supported
103016b9bdbSStephen Smalley	  by SELinux to be set to a particular value.  This value is reported
104016b9bdbSStephen Smalley	  to userspace via /selinux/policyvers and used at policy load time.
105016b9bdbSStephen Smalley	  It can be adjusted downward to support legacy userland (init) that
106016b9bdbSStephen Smalley	  does not correctly handle kernels that support newer policy versions.
107016b9bdbSStephen Smalley
108016b9bdbSStephen Smalley	  Examples:
109016b9bdbSStephen Smalley	  For the Fedora Core 3 or 4 Linux distributions, enable this option
1103dde6ad8SDavid Sterba	  and set the value via the next option. For Fedora Core 5 and later,
111016b9bdbSStephen Smalley	  do not enable this option.
112016b9bdbSStephen Smalley
113016b9bdbSStephen Smalley	  If you are unsure how to answer this question, answer N.
114016b9bdbSStephen Smalley
115016b9bdbSStephen Smalleyconfig SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
116016b9bdbSStephen Smalley	int "NSA SELinux maximum supported policy format version value"
117016b9bdbSStephen Smalley	depends on SECURITY_SELINUX_POLICYDB_VERSION_MAX
11864dbf074SEric Paris	range 15 23
119016b9bdbSStephen Smalley	default 19
120016b9bdbSStephen Smalley	help
121016b9bdbSStephen Smalley	  This option sets the value for the maximum policy format version
122016b9bdbSStephen Smalley	  supported by SELinux.
123016b9bdbSStephen Smalley
124016b9bdbSStephen Smalley	  Examples:
125016b9bdbSStephen Smalley	  For Fedora Core 3, use 18.
126016b9bdbSStephen Smalley	  For Fedora Core 4, use 19.
127016b9bdbSStephen Smalley
128016b9bdbSStephen Smalley	  If you are unsure how to answer this question, look for the
129016b9bdbSStephen Smalley	  policy format version supported by your policy toolchain, by
130016b9bdbSStephen Smalley	  running 'checkpolicy -V'. Or look at what policy you have
131016b9bdbSStephen Smalley	  installed under /etc/selinux/$SELINUXTYPE/policy, where
132016b9bdbSStephen Smalley	  SELINUXTYPE is defined in your /etc/selinux/config.
133016b9bdbSStephen Smalley
134