diff --git a/BUILD.gn b/BUILD.gn index 80241589b45ece7e6ef60804b3d3b19acfef8320..f8a9f84bcd61f79b7ef0b52ea19bfe4f7489690a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -233,3 +233,28 @@ ohos_prebuilt_etc("file_contexts") { #relative_install_dir = "selinux/targeted/contexts/files/" relative_install_dir = "selinux/targeted/contexts/" } + +group("selinux_group") { + if (build_selinux) { + deps = [ + "//base/security/selinux:build_file_contexts", + "//base/security/selinux:build_sepolicy", + "//base/security/selinux:config", + "//base/security/selinux:file_contexts", + "//base/security/selinux:load_policy", + "//base/security/selinux:restorecon", + "//base/security/selinux:selinux_test", + "//third_party/selinux:checkpolicy($host_toolchain)", + "//third_party/selinux:chkcon", + "//third_party/selinux:getenforce", + "//third_party/selinux:getfilecon", + "//third_party/selinux:getpidcon", + "//third_party/selinux:secilc($host_toolchain)", + "//third_party/selinux:sefcontext_compile($host_toolchain)", + "//third_party/selinux:selinux_check_access", + "//third_party/selinux:selinuxexeccon", + "//third_party/selinux:setenforce", + "//third_party/selinux:setfilecon", + ] + } +} diff --git a/bundle.json b/bundle.json new file mode 100755 index 0000000000000000000000000000000000000000..1d2029a599afe8576b453d24a96fb623ed74dd60 --- /dev/null +++ b/bundle.json @@ -0,0 +1,55 @@ +{ + "name": "@ohos/selinux", + "description": "security-enhanced linux(SELINUX) is a mandatory access control mechanism on linux", + "version": "3.1", + "license": "Apache License 2.0", + "publishAs": "code-segment", + "segment": { + "destPath": "base/security/selinux" + }, + "scripts": {}, + "dirs": {}, + "component": { + "name": "selinux", + "subsystem": "security", + "adapted_system_type": [ "standard" ], + "deps": { + "components": [ + "init" + ], + "third_party": [ + "selinux", + "pcre2", + "FreeBSD", + "toybox", + "Linux_Kernel" + ] + }, + "build": { + "sub_component": [ + "//base/security/selinux:selinux_group" + ], + "inner_kits": [ + { + "name": "//base/security/selinux:libload_policy", + "header": { + "header_files": [ + "policycoreutils.h" + ], + "header_base": "//base/security/selinux/interfaces/policycoreutils/include" + } + }, + { + "name": "//base/security/selinux:librestorecon", + "header": { + "header_files": [ + "policycoreutils.h" + ], + "header_base": "//base/security/selinux/interfaces/policycoreutils/include" + } + } + ], + "test": [] + } + } + } diff --git a/ohos.build b/ohos.build deleted file mode 100644 index c806825098303ec604f68492f7b134bdc6863b93..0000000000000000000000000000000000000000 --- a/ohos.build +++ /dev/null @@ -1,10 +0,0 @@ -{ - "subsystem": "security", - "parts": { - "selinux": { - "module_list": [ - "//third_party/selinux:selinux_group" - ] - } - } -}