Change-Id: I09594fae53d991f49161da4b96e8b3b7ee2f598e
static int copyNCreateSymlink(std::string binPath, std::string tacVersionDir, std::string nugetPackage, bool isCreateTacDir)
{
uid_t g_uid = 0;
- gid_t g_gid = 0;
+ const gid_t g_gid = 0;
if (pkgmgr_installer_info_get_target_uid(&g_uid) < 0) {
_ERR("Failed to get UID");
return -1;
tac_db = NULL;
}
- uid_t g_uid = 301; // app_fw
- gid_t g_gid = 301; // app_fw
+ const uid_t g_uid = 301; // app_fw
+ const gid_t g_gid = 301; // app_fw
if (!copyFile(TAC_APP_LIST_RESTORE_DB, TAC_APP_LIST_DB)) {
fprintf(stderr, "Failed to copy of %s\n", TAC_APP_LIST_DB);
}
// change owner and groups for symbolic link.
- if (!stat(fromPath.c_str(), &info)) {
+ if (!lstat(fromPath.c_str(), &info)) {
if (lchown(toPath.c_str(), info.st_uid, info.st_gid) == -1)
fprintf(stderr, "Failed to change owner and group name\n");
}