|
|
@ -124,14 +124,15 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
|
|
|
|
|
|
|
|
|
|
|
|
if (kde_home[0] == '~')
|
|
|
|
if (kde_home[0] == '~')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (uid == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
home_dir = pw_ent->pw_dir ? pw_ent->pw_dir : "/root";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!home_dir || !home_dir[0])
|
|
|
|
if (!home_dir || !home_dir[0])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(stderr, "[lnusertemp] Aborting. $HOME not set!\n");
|
|
|
|
if ( uid == 0 ) {
|
|
|
|
return 1;
|
|
|
|
home_dir = pw_ent->pw_dir ? pw_ent->pw_dir : "/root";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
fprintf(stderr, "[lnusertemp] Aborting. $HOME not set!\n");
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (strlen(home_dir) > (PATH_MAX-100))
|
|
|
|
if (strlen(home_dir) > (PATH_MAX-100))
|
|
|
|
{
|
|
|
|
{
|
|
|
|