tac_db = NULL;
}
+ uid_t g_uid = 301; // app_fw
+ 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);
return TAC_ERROR_UNKNOWN;
fprintf(stderr, "Failed to remove of %s\n", TAC_APP_LIST_RESTORE_DB);
return TAC_ERROR_UNKNOWN;
}
+ if (chown(TAC_APP_LIST_DB, g_uid, g_gid) == -1) {
+ fprintf(stderr, "Failed to change owner and group name\n");
+ }
std::string dbJournal = TAC_APP_LIST_DB + std::string("-journal");
if (!copyFile(dbRestoreJournal, dbJournal)) {
fprintf(stderr, "Failed to remove of %s\n", dbRestoreJournal.c_str());
return TAC_ERROR_UNKNOWN;
}
+ if (chown(dbJournal.c_str(), g_uid, g_gid) == -1) {
+ fprintf(stderr, "Failed to change owner and group name\n");
+ }
cleanupDirectory();
+
return TAC_ERROR_NONE;
}