forked from enlightenment/efl
elm config - handle profile name of ".." as its obviously invalid
this forbids .., as a profile name in addition to the existing "stip / from profile name".
This commit is contained in:
parent
8094893877
commit
944ce7ef41
|
@ -107,8 +107,6 @@ eina_environment_tmp_get(void)
|
|||
if (!tmp) tmp = getenv("USERPROFILE");
|
||||
if (!tmp) tmp = getenv("WINDIR");
|
||||
if (!tmp) tmp = "C:\\";
|
||||
|
||||
return tmp;
|
||||
#else
|
||||
# if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
|
||||
if (getuid() == geteuid())
|
||||
|
@ -120,7 +118,7 @@ eina_environment_tmp_get(void)
|
|||
if (!tmp) tmp = getenv("TEMP");
|
||||
}
|
||||
if (!tmp) tmp = "/tmp";
|
||||
|
||||
return tmp;
|
||||
#endif
|
||||
tmp = strdup(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
|
|
@ -1456,8 +1456,13 @@ _profile_fetch_from_conf(void)
|
|||
{
|
||||
p = strchr(_elm_profile, '/');
|
||||
if (p) *p = 0;
|
||||
if (!strcmp(_elm_profile, ".."))
|
||||
{
|
||||
free(_elm_profile);
|
||||
_elm_profile = NULL;
|
||||
}
|
||||
else return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
|
|
Loading…
Reference in New Issue