mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 01:00:38 +00:00
修改bug
Signed-off-by: xionglei6 <xionglei6@huawei.com>
This commit is contained in:
parent
93dde26215
commit
2ba256b777
6
BUILD.gn
6
BUILD.gn
@ -37,7 +37,7 @@ config("appspawn_config") {
|
||||
]
|
||||
|
||||
if (build_selinux) {
|
||||
cflags += [ "-DWITH_SELINUX" ]
|
||||
cflags = [ "-DWITH_SELINUX" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,9 +48,7 @@ ohos_executable("appspawn") {
|
||||
"${appspawn_path}:appspawn_server",
|
||||
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
|
||||
]
|
||||
external_deps = [
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
|
||||
install_enable = true
|
||||
subsystem_name = "${subsystem_name}"
|
||||
|
@ -87,7 +87,9 @@ public:
|
||||
static constexpr int LEN_PROC_NAME = 256; // process name length
|
||||
static constexpr int LEN_SO_PATH = 256; // load so lib
|
||||
static constexpr int MAX_GIDS = 64;
|
||||
#ifdef WITH_SELINUX
|
||||
static constexpr int APL_MAX_LEN = 32;
|
||||
#endif
|
||||
|
||||
struct AppProperty {
|
||||
uint32_t uid; // the UNIX uid that the child process setuid() to after fork()
|
||||
@ -97,7 +99,9 @@ public:
|
||||
char processName[LEN_PROC_NAME]; // process name
|
||||
char soPath[LEN_SO_PATH]; // so lib path
|
||||
uint32_t accessTokenId;
|
||||
char apl[APL_MAX_LEN];
|
||||
#ifdef WITH_SELINUX
|
||||
char apl[APL_MAX_LEN];
|
||||
#endif
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -52,7 +52,7 @@ ohos_unittest("AppSpawnServerOverrideTest") {
|
||||
|
||||
if (build_selinux) {
|
||||
external_deps += [ "selinux:libhap_restorecon" ]
|
||||
cflags += [ "-DWITH_SELINUX" ]
|
||||
cflags = [ "-DWITH_SELINUX" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,9 +94,8 @@ ohos_unittest("AppSpawnServerMockTest") {
|
||||
|
||||
if (build_selinux) {
|
||||
external_deps += [ "selinux:libhap_restorecon" ]
|
||||
cflags += [ "-DWITH_SELINUX" ]
|
||||
cflags = [ "-DWITH_SELINUX" ]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
group("unittest") {
|
||||
|
Loading…
Reference in New Issue
Block a user