Config.in 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. config BR2_PACKAGE_REFPOLICY
  2. bool "refpolicy"
  3. depends on BR2_TOOLCHAIN_HAS_THREADS # libsepol
  4. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # libsepol
  5. depends on BR2_HOST_GCC_AT_LEAST_5 # host-setools -> host-libsepol
  6. # Even though libsepol is not necessary for building, we get
  7. # the policy version from libsepol, so we select it, and treat
  8. # it like a runtime dependency.
  9. select BR2_PACKAGE_LIBSEPOL
  10. help
  11. The SELinux Reference Policy project (refpolicy) is a
  12. complete SELinux policy that can be used as the system
  13. policy for a variety of systems and used as the basis for
  14. creating other policies. Reference Policy was originally
  15. based on the NSA example policy, but aims to accomplish many
  16. additional goals.
  17. The current refpolicy does not fully support Buildroot and
  18. needs modifications to work with the default system file
  19. layout. These changes should be added as patches to the
  20. refpolicy that modify a single SELinux policy.
  21. The refpolicy works for the most part in permissive
  22. mode. Only the basic set of utilities are enabled in the
  23. example policy config and some of the pathing in the
  24. policies is not correct. Individual policies would need to
  25. be tweaked to get everything functioning properly.
  26. https://github.com/TresysTechnology/refpolicy
  27. if BR2_PACKAGE_REFPOLICY
  28. choice
  29. prompt "Refpolicy version"
  30. default BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
  31. config BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
  32. bool "Upstream version"
  33. # Consider reworking the following when adding new entries:
  34. # Upstream refpolicy for openssh expects linux-pam to be used
  35. select BR2_PACKAGE_LINUX_PAM if BR2_PACKAGE_OPENSSH \
  36. && BR2_USE_MMU \
  37. && BR2_ENABLE_LOCALE \
  38. && BR2_USE_WCHAR \
  39. && !BR2_STATIC_LIBS \
  40. && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
  41. help
  42. Use the refpolicy as provided by Buildroot.
  43. config BR2_PACKAGE_REFPOLICY_CUSTOM_GIT
  44. bool "Custom git repository"
  45. help
  46. Allows to get the refpolicy from a custom git repository.
  47. The custom refpolicy must define the full policy explicitly,
  48. and must be a fork of the original refpolicy, to have the
  49. same build system. When this is selected, only the custom
  50. policy definition are taken into account and all the modules
  51. of the policy are built into the binary policy.
  52. endchoice
  53. if BR2_PACKAGE_REFPOLICY_CUSTOM_GIT
  54. config BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_URL
  55. string "URL of custom repository"
  56. config BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_VERSION
  57. string "Custom repository version"
  58. help
  59. Revision to use in the typical format used by Git.
  60. E.g. a sha id, tag, branch...
  61. endif
  62. choice
  63. prompt "SELinux default state"
  64. default BR2_PACKAGE_REFPOLICY_POLICY_STATE_PERMISSIVE
  65. config BR2_PACKAGE_REFPOLICY_POLICY_STATE_ENFORCING
  66. bool "Enforcing"
  67. help
  68. SELinux security policy is enforced
  69. config BR2_PACKAGE_REFPOLICY_POLICY_STATE_PERMISSIVE
  70. bool "Permissive"
  71. help
  72. SELinux prints warnings instead of enforcing
  73. config BR2_PACKAGE_REFPOLICY_POLICY_STATE_DISABLED
  74. bool "Disabled"
  75. help
  76. No SELinux policy is loaded
  77. endchoice
  78. config BR2_PACKAGE_REFPOLICY_POLICY_STATE
  79. string
  80. default "permissive" if BR2_PACKAGE_REFPOLICY_POLICY_STATE_PERMISSIVE
  81. default "enforcing" if BR2_PACKAGE_REFPOLICY_POLICY_STATE_ENFORCING
  82. default "disabled" if BR2_PACKAGE_REFPOLICY_POLICY_STATE_DISABLED
  83. if BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
  84. config BR2_REFPOLICY_EXTRA_MODULES_DIRS
  85. string "Extra modules directories"
  86. help
  87. Specify a space-separated list of directories containing
  88. SELinux modules that will be built into the SELinux
  89. policy. The modules will be automatically enabled in the
  90. policy.
  91. Each of those directories must contain the SELinux policy
  92. .fc, .if and .te files directly at the top-level, with no
  93. sub-directories. Also, you cannot have several modules with
  94. the same name in different directories.
  95. config BR2_REFPOLICY_EXTRA_MODULES
  96. string "Extra modules to enable"
  97. help
  98. List of extra SELinux modules to enable in the refpolicy.
  99. endif
  100. endif
  101. comment "refpolicy needs a toolchain w/ threads, gcc >= 5, host gcc >= 5"
  102. depends on !BR2_TOOLCHAIN_HAS_THREADS || \
  103. !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \
  104. !BR2_HOST_GCC_AT_LEAST_5