Change-Id: I04d3b89d40d5b000e483104e23388442b254040b
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
}
char pkgname[255] = {0, };
- aul_app_get_pkgname_bypid(getpid(), pkgname, 255);
- int ret = (*ppriv_func)(pkgname);
+ int ret = aul_app_get_appid_bypid(getpid(), pkgname, 255);
+ if (ret != AUL_R_OK)
+ {
+ fprintf(stderr, "Cannot acquire app from pid with 0x%x.\n", ret);
+
+ dlclose(handle);
+ return;
+ }
+
+ ret = (*ppriv_func)(pkgname);
if (ret < 0)
{
fprintf(stderr, "set_privilege() returned %d\n", ret);