}
std::string Aul::GetAppId(int pid) {
- if (getuid() >= kRegularUidMin) {
- char app_id[256] = { 0, };
- int ret = aul_app_get_appid_bypid(pid, app_id, sizeof(app_id));
- if (ret == AUL_R_OK) return std::string(app_id);
- }
+ if (getpid() == pid && getuid() < kRegularUidMin) return GetName(pid);
+
+ char app_id[256] = { 0, };
+ int ret = aul_app_get_appid_bypid(pid, app_id, sizeof(app_id));
+ if (ret == AUL_R_OK) return std::string(app_id);
return GetName(pid);
}
const std::shared_ptr<PeerCred>& cred) {
std::string app_id;
if (cred->GetUid() >= kRegularUidMin) app_id = Aul::GetAppId(cred->GetPid());
+
auto response_func = [=](int res) -> void {
if (freed_stubs_.find(this) != freed_stubs_.end())
return; // LCOV_EXCL_LINE