Kconfig 6.1 KB

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