From f11d686c96f7ac06b9ea411367548d34229548a3 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 23 Aug 2015 15:02:22 +0200 Subject: [PATCH] launch_daemon: Remove extra quoting around env variables. The extra quotes aren't needed and cause problems when not parsed through a shell. For example LD_PRELOAD which is handled by the runtime_loader directly failed to work as there was no way to remove the extra single quotes. Note that quotes and single quotes can still be added to the variables through respective quoting in the driver settings syntax. --- src/servers/launch/BaseJob.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/servers/launch/BaseJob.cpp b/src/servers/launch/BaseJob.cpp index 3dc5d93b25..ef27fa134d 100644 --- a/src/servers/launch/BaseJob.cpp +++ b/src/servers/launch/BaseJob.cpp @@ -151,7 +151,7 @@ BaseJob::SetEnvironment(const BMessage& message) } BString variable = name; - variable << "='"; + variable << "="; const char* argument; for (int32 argumentIndex = 0; message.FindString(name, argumentIndex, @@ -160,7 +160,6 @@ BaseJob::SetEnvironment(const BMessage& message) variable << " "; variable += argument; } - variable << "'"; fEnvironment.Add(variable); }