|
@@ -40,46 +40,44 @@ void start_remote_actor(
|
|
argv[0] = fileBuffer;
|
|
argv[0] = fileBuffer;
|
|
|
|
|
|
char flagBuffer[3];
|
|
char flagBuffer[3];
|
|
- strncpy(flagBuffer, "-f", 3);
|
|
|
|
|
|
+ strncpy(flagBuffer, "-n", 3);
|
|
|
|
|
|
char targetBuffer[64];
|
|
char targetBuffer[64];
|
|
strncpy(targetBuffer, target.c_str(), 64);
|
|
strncpy(targetBuffer, target.c_str(), 64);
|
|
|
|
|
|
- std::string fullArgString();
|
|
|
|
|
|
+ std::string fullArgString("~/prsona/prsona/scripts/startup.sh ");
|
|
char fullArgBuffer[256];
|
|
char fullArgBuffer[256];
|
|
|
|
|
|
|
|
+ fullArgString = fullArgString + (server ? "server" : "client") + " ";
|
|
|
|
+
|
|
char idBuffer[64];
|
|
char idBuffer[64];
|
|
strncpy(idBuffer, id.c_str(), 64);
|
|
strncpy(idBuffer, id.c_str(), 64);
|
|
|
|
|
|
|
|
+ fullArgString = fullArgString + id + " ";
|
|
|
|
+
|
|
char outputBuffer[128];
|
|
char outputBuffer[128];
|
|
strncpy(outputBuffer, output.c_str(), 128);
|
|
strncpy(outputBuffer, output.c_str(), 128);
|
|
|
|
|
|
|
|
+ fullArgString = fullArgString + output + " ";
|
|
|
|
+
|
|
std::stringstream lambdaStream;
|
|
std::stringstream lambdaStream;
|
|
lambdaStream << lambda;
|
|
lambdaStream << lambda;
|
|
char lambdaBuffer[3];
|
|
char lambdaBuffer[3];
|
|
strncpy(lambdaBuffer, lambdaStream.str().c_str(), 3);
|
|
strncpy(lambdaBuffer, lambdaStream.str().c_str(), 3);
|
|
|
|
|
|
|
|
+ fullArgString = fullArgString + lambdaStream.str() + " ";
|
|
|
|
+
|
|
char maliciousBuffer[3];
|
|
char maliciousBuffer[3];
|
|
if (maliciousServers)
|
|
if (maliciousServers)
|
|
strncpy(maliciousBuffer, "T", 2);
|
|
strncpy(maliciousBuffer, "T", 2);
|
|
else
|
|
else
|
|
strncpy(maliciousBuffer, "F", 2);
|
|
strncpy(maliciousBuffer, "F", 2);
|
|
|
|
|
|
|
|
+ fullArgString = fullArgString + (maliciousServers ? "T" : "F");
|
|
|
|
+ strncpy(fullArgBuffer, fullArgString.c_str(), 256);
|
|
|
|
+
|
|
if (target != "self" && !target.empty())
|
|
if (target != "self" && !target.empty())
|
|
{
|
|
{
|
|
- fullArgString = "~/prsona/prsona/scripts/startup.sh ";
|
|
|
|
- fullArgString += (server ? "server" : "client");
|
|
|
|
- fullArgString += " ";
|
|
|
|
- fullArgString += id;
|
|
|
|
- fullArgString += " ";
|
|
|
|
- fullArgString += output;
|
|
|
|
- fullArgString += " ";
|
|
|
|
- fullArgString += lambdaStream.str();
|
|
|
|
- fullArgString += " ";
|
|
|
|
- fullArgString += (maliciousServers ? "T" : "F");
|
|
|
|
-
|
|
|
|
- strncpy(fullArgBuffer, fullArgString.c_str(), 256);
|
|
|
|
-
|
|
|
|
argv[1] = flagBuffer;
|
|
argv[1] = flagBuffer;
|
|
argv[2] = targetBuffer;
|
|
argv[2] = targetBuffer;
|
|
argv[3] = fullArgBuffer;
|
|
argv[3] = fullArgBuffer;
|