adapter rpc for samgr use musl

Signed-off-by: sin_dzzeng <13277932042@163.com>
This commit is contained in:
sin_dzzeng 2022-04-09 11:21:25 +08:00
parent 68666ee9ef
commit c80617d348
2 changed files with 6 additions and 1 deletions

View File

@ -37,4 +37,9 @@ config("ipc_util_config") {
if (defined(build_public_version) && build_public_version) {
cflags += [ "-DBUILD_PUBLIC_VERSION" ]
}
if (use_musl) {
cflags += [ "-DSAMGR_PROCESS_UID=1005" ]
} else {
cflags += [ "-DSAMGR_PROCESS_UID=1000" ]
}
}

View File

@ -39,7 +39,7 @@ static constexpr HiLogLabel LABEL = { LOG_CORE, LOG_ID_IPC, "IPCObjectStub" };
// Authentication information can be added only for processes with system permission.
static constexpr pid_t ALLOWED_UID = 10000;
// Only the samgr can obtain the UID and PID.
static constexpr pid_t SYSTEM_SERVER_UID = 1000;
static constexpr pid_t SYSTEM_SERVER_UID = SAMGR_PROCESS_UID;
#endif
static constexpr pid_t SHELL_UID = 2000;