mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[254785] [dstore] RSE Server assumes home directory on target machine
This commit is contained in:
parent
2b0e88e140
commit
def631d22f
2 changed files with 29 additions and 7 deletions
|
@ -8,6 +8,7 @@
|
||||||
#
|
#
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
|
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
|
|
||||||
use Shell;
|
use Shell;
|
||||||
|
@ -49,6 +50,9 @@ else
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$passwd=$passwdStruct[1];
|
$passwd=$passwdStruct[1];
|
||||||
|
$dir=$passwdStruct[7]; // get the user's home dir
|
||||||
|
#$passwd = $pass;
|
||||||
|
|
||||||
$encryptedPWD = crypt($pwdIN, $passwd);
|
$encryptedPWD = crypt($pwdIN, $passwd);
|
||||||
$classpath=$ENV{CLASSPATH};
|
$classpath=$ENV{CLASSPATH};
|
||||||
$suOptions="-p";
|
$suOptions="-p";
|
||||||
|
@ -65,7 +69,14 @@ else
|
||||||
$suOptions="-";
|
$suOptions="-";
|
||||||
}
|
}
|
||||||
|
|
||||||
system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
|
# check for the existence of a home directory
|
||||||
|
$homeDir=$dir;
|
||||||
|
if (!(-e $homeDir))
|
||||||
|
{
|
||||||
|
$homeDir="/tmp/" . $userIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
system("su $suOptions $userIN -c '$javaExe -Duser.home=$homeDir -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#
|
#
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
|
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
|
|
||||||
use Shell;
|
use Shell;
|
||||||
|
@ -49,6 +50,9 @@ else
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$passwd=$passwdStruct[1];
|
$passwd=$passwdStruct[1];
|
||||||
|
$dir=$passwdStruct[7]; // get the user's home dir
|
||||||
|
#$passwd = $pass;
|
||||||
|
|
||||||
$encryptedPWD = crypt($pwdIN, $passwd);
|
$encryptedPWD = crypt($pwdIN, $passwd);
|
||||||
$classpath=$ENV{CLASSPATH};
|
$classpath=$ENV{CLASSPATH};
|
||||||
$suOptions="-p";
|
$suOptions="-p";
|
||||||
|
@ -65,7 +69,14 @@ else
|
||||||
$suOptions="-";
|
$suOptions="-";
|
||||||
}
|
}
|
||||||
|
|
||||||
system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
|
# check for the existence of a home directory
|
||||||
|
$homeDir=$dir;
|
||||||
|
if (!(-e $homeDir))
|
||||||
|
{
|
||||||
|
$homeDir="/tmp/" . $userIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
system("su $suOptions $userIN -c '$javaExe -Duser.home=$homeDir -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue