Check the condition using getuid(), instead of uid of installer context.
Change-Id: Ic263a8ef0fa4edd18fbb3fc0032976a2b1eb2944
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
PrivilegeLevel level = PrivilegeLevel::UNTRUSTED;
std::string error_message;
bool check_reference = true;
- if (context_->uid.get() == 0 &&
+ if (getuid() == 0 &&
(context_->request_type.get()== ci::RequestType::ManifestDirectInstall ||
context_->request_type.get() == ci::RequestType::ManifestDirectUpdate))
check_reference = false;