Kconfig 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. config SECURITY_SELINUX
  2. bool "NSA SELinux Support"
  3. depends on SECURITY_NETWORK && AUDIT && NET && INET
  4. select NETWORK_SECMARK
  5. default n
  6. help
  7. This selects NSA Security-Enhanced Linux (SELinux).
  8. You will also need a policy configuration and a labeled filesystem.
  9. You can obtain the policy compiler (checkpolicy), the utility for
  10. labeling filesystems (setfiles), and an example policy configuration
  11. from <http://www.nsa.gov/selinux/>.
  12. If you are unsure how to answer this question, answer N.
  13. config SECURITY_SELINUX_BOOTPARAM
  14. bool "NSA SELinux boot parameter"
  15. depends on SECURITY_SELINUX
  16. default n
  17. help
  18. This option adds a kernel parameter 'selinux', which allows SELinux
  19. to be disabled at boot. If this option is selected, SELinux
  20. functionality can be disabled with selinux=0 on the kernel
  21. command line. The purpose of this option is to allow a single
  22. kernel image to be distributed with SELinux built in, but not
  23. necessarily enabled.
  24. If you are unsure how to answer this question, answer N.
  25. config SECURITY_SELINUX_BOOTPARAM_VALUE
  26. int "NSA SELinux boot parameter default value"
  27. depends on SECURITY_SELINUX_BOOTPARAM
  28. range 0 1
  29. default 1
  30. help
  31. This option sets the default value for the kernel parameter
  32. 'selinux', which allows SELinux to be disabled at boot. If this
  33. option is set to 0 (zero), the SELinux kernel parameter will
  34. default to 0, disabling SELinux at bootup. If this option is
  35. set to 1 (one), the SELinux kernel parameter will default to 1,
  36. enabling SELinux at bootup.
  37. If you are unsure how to answer this question, answer 1.
  38. config SECURITY_SELINUX_DISABLE
  39. bool "NSA SELinux runtime disable"
  40. depends on SECURITY_SELINUX
  41. default n
  42. help
  43. This option enables writing to a selinuxfs node 'disable', which
  44. allows SELinux to be disabled at runtime prior to the policy load.
  45. SELinux will then remain disabled until the next boot.
  46. This option is similar to the selinux=0 boot parameter, but is to
  47. support runtime disabling of SELinux, e.g. from /sbin/init, for
  48. portability across platforms where boot parameters are difficult
  49. to employ.
  50. If you are unsure how to answer this question, answer N.
  51. config SECURITY_SELINUX_DEVELOP
  52. bool "NSA SELinux Development Support"
  53. depends on SECURITY_SELINUX
  54. default y
  55. help
  56. This enables the development support option of NSA SELinux,
  57. which is useful for experimenting with SELinux and developing
  58. policies. If unsure, say Y. With this option enabled, the
  59. kernel will start in permissive mode (log everything, deny nothing)
  60. unless you specify enforcing=1 on the kernel command line. You
  61. can interactively toggle the kernel between enforcing mode and
  62. permissive mode (if permitted by the policy) via /selinux/enforce.
  63. config SECURITY_SELINUX_AVC_STATS
  64. bool "NSA SELinux AVC Statistics"
  65. depends on SECURITY_SELINUX
  66. default y
  67. help
  68. This option collects access vector cache statistics to
  69. /selinux/avc/cache_stats, which may be monitored via
  70. tools such as avcstat.
  71. config SECURITY_SELINUX_CHECKREQPROT_VALUE
  72. int "NSA SELinux checkreqprot default value"
  73. depends on SECURITY_SELINUX
  74. range 0 1
  75. default 1
  76. help
  77. This option sets the default value for the 'checkreqprot' flag
  78. that determines whether SELinux checks the protection requested
  79. by the application or the protection that will be applied by the
  80. kernel (including any implied execute for read-implies-exec) for
  81. mmap and mprotect calls. If this option is set to 0 (zero),
  82. SELinux will default to checking the protection that will be applied
  83. by the kernel. If this option is set to 1 (one), SELinux will
  84. default to checking the protection requested by the application.
  85. The checkreqprot flag may be changed from the default via the
  86. 'checkreqprot=' boot parameter. It may also be changed at runtime
  87. via /selinux/checkreqprot if authorized by policy.
  88. If you are unsure how to answer this question, answer 1.
  89. config SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT
  90. bool "NSA SELinux enable new secmark network controls by default"
  91. depends on SECURITY_SELINUX
  92. default n
  93. help
  94. This option determines whether the new secmark-based network
  95. controls will be enabled by default. If not, the old internal
  96. per-packet controls will be enabled by default, preserving
  97. old behavior.
  98. If you enable the new controls, you will need updated
  99. SELinux userspace libraries, tools and policy. Typically,
  100. your distribution will provide these and enable the new controls
  101. in the kernel they also distribute.
  102. Note that this option can be overridden at boot with the
  103. selinux_compat_net parameter, and after boot via
  104. /selinux/compat_net. See Documentation/kernel-parameters.txt
  105. for details on this parameter.
  106. If you enable the new network controls, you will likely
  107. also require the SECMARK and CONNSECMARK targets, as
  108. well as any conntrack helpers for protocols which you
  109. wish to control.
  110. If you are unsure what to do here, select N.
  111. config SECURITY_SELINUX_POLICYDB_VERSION_MAX
  112. bool "NSA SELinux maximum supported policy format version"
  113. depends on SECURITY_SELINUX
  114. default n
  115. help
  116. This option enables the maximum policy format version supported
  117. by SELinux to be set to a particular value. This value is reported
  118. to userspace via /selinux/policyvers and used at policy load time.
  119. It can be adjusted downward to support legacy userland (init) that
  120. does not correctly handle kernels that support newer policy versions.
  121. Examples:
  122. For the Fedora Core 3 or 4 Linux distributions, enable this option
  123. and set the value via the next option. For Fedore Core 5 and later,
  124. do not enable this option.
  125. If you are unsure how to answer this question, answer N.
  126. config SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
  127. int "NSA SELinux maximum supported policy format version value"
  128. depends on SECURITY_SELINUX_POLICYDB_VERSION_MAX
  129. range 15 21
  130. default 19
  131. help
  132. This option sets the value for the maximum policy format version
  133. supported by SELinux.
  134. Examples:
  135. For Fedora Core 3, use 18.
  136. For Fedora Core 4, use 19.
  137. If you are unsure how to answer this question, look for the
  138. policy format version supported by your policy toolchain, by
  139. running 'checkpolicy -V'. Or look at what policy you have
  140. installed under /etc/selinux/$SELINUXTYPE/policy, where
  141. SELINUXTYPE is defined in your /etc/selinux/config.