Change-Id: I760f68c48de986fe1ebf85087a045490245cced3
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
files[0] = (char *)db_file;
files[1] = journal_file;
files[2] = NULL;
+ mode_t mode;
if (db_file == NULL)
return -1;
return -1;
}
- ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH;
+ if (!strcmp(db_file, getUserPkgCertDBPathUID(GLOBAL_USER)))
+ mode |= S_IWOTH;
+ ret = chmod(files[i], mode);
if (ret == -1) {
if (strerror_r(errno, buf, sizeof(buf)))
strcpy(buf, "");