ACCOUNT_GET_USER_DB_DIR(account_db_dir, sizeof(account_db_dir), uid);
if ((-1 == access(account_db_dir, F_OK)) && uid != OWNER_ROOT) {
int ret;
- mkdir(account_db_dir, 777);
+ mkdir(account_db_dir, 755);
ret = chown(account_db_dir, SERVICE_FW_UID, SERVICE_FW_GID);
ACCOUNT_DEBUG("chown result = [%d]", ret);
- ret = chmod(account_db_dir, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH);
+ ret = chmod(account_db_dir, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
ACCOUNT_DEBUG("chmod result = [%d]", ret);
rc = db_util_open(account_db_path, p_hAccountDB, DB_UTIL_REGISTER_HOOK_METHOD);
ret = chown(account_db_path, SERVICE_FW_UID, SERVICE_FW_GID);
ACCOUNT_DEBUG("chown result = [%d]", ret);
- ret = chmod(account_db_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+ ret = chmod(account_db_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
ACCOUNT_DEBUG("chmod result = [%d]", ret);
} else {
if (mode == ACCOUNT_DB_OPEN_READWRITE)
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
- ACCOUNT_GET_GLOBAL_DB_PATH(account_db_path, sizeof(account_db_path));
+ ACCOUNT_GET_OWNER_DB_PATH(account_db_path, sizeof(account_db_path), 5001);
_INFO("account_db_path canonicalized = %s", account_db_path);
ACCOUNT_GET_USER_DB_DIR(account_db_dir, sizeof(account_db_dir), uid);
if ((-1 == access(account_db_dir, F_OK)) && uid != OWNER_ROOT) {
int ret;
- mkdir(account_db_dir, 777);
+ mkdir(account_db_dir, 755);
ret = chown(account_db_dir, SERVICE_FW_UID, SERVICE_FW_GID);
ACCOUNT_DEBUG("chown result = [%d]", ret);
- ret = chmod(account_db_dir, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH);
+ ret = chmod(account_db_dir, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
ACCOUNT_DEBUG("chmod result = [%d]", ret);
rc = db_util_open(account_db_path, &g_hAccountGlobalDB, DB_UTIL_REGISTER_HOOK_METHOD);
ret = chown(account_db_path, SERVICE_FW_UID, SERVICE_FW_GID);
ACCOUNT_DEBUG("chown result = [%d]", ret);
- ret = chmod(account_db_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+ ret = chmod(account_db_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
ACCOUNT_DEBUG("chmod result = [%d]", ret);
} else {
if (mode == ACCOUNT_DB_OPEN_READWRITE)
}
/* Workaround for internal UTC */
+ _INFO("UID is [%d]", (int)uid);
if (uid == 0)
uid = getuid();