- char *elm_profile_path = (char*)elm_config_profile_dir_get(elm_config_profile_get(), EINA_TRUE);
-
- setenv("HOME", "/root", 1);
-
- ret = chown(ELM_PROFILE_CFG, APP_OWNER_ID, APP_GROUP_ID);
- if (ret < 0)
- {
- chmod (ELM_PROFILE_CFG, 0777);
- }
-
- DIR *d = NULL;
- struct dirent *e;
-
- if (elm_profile_path)
- d = opendir (elm_profile_path);
-
- if (d)
- {
- while ((e = readdir (d)))
- {
- if (e->d_name[0] != '.' && (strstr(e->d_name, ".cfg") != 0 || strstr(e->d_name, ".CFG") != 0))
- {
- char file_full_path[100];
-
- sprintf(file_full_path, "%s/%s", elm_profile_path, e->d_name);
-
- ret = chown(file_full_path, APP_OWNER_ID, APP_GROUP_ID);
- if (ret < 0)
- {
- DEBUG_LOG("chown is failed %s", file_full_path);
- chmod (file_full_path, 0777);
- }
- }
- }
-
- closedir (d);
- }
-