summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-04 12:42:24 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-04 13:02:42 +0200
commit1be5082af805e71ce2ca6ed04ff5de0f069da770 (patch)
tree55d89790592f7391c7587e1432ae462cd58e9c5a /src/sdk
parent8482b4da46505c725d93a1e0478ded99bcbde4d2 (diff)
parent09b8632d301ffa865bf717c5497b6b7a17e86b53 (diff)
Merge remote-tracking branch 'origin/2.0'
Conflicts: src/libs/installer/packagemanagercore.cpp Change-Id: Ie3d94fe3a633e189c260bf20682c00a2bb901bc8
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/commandlineparser.cpp2
-rw-r--r--src/sdk/main.cpp13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp
index 4a1f0080f..842edde3b 100644
--- a/src/sdk/commandlineparser.cpp
+++ b/src/sdk/commandlineparser.cpp
@@ -57,7 +57,7 @@ CommandLineParser::CommandLineParser()
QLatin1String("Verbose mode. Prints out more information.")));
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Proxy),
- QLatin1String("Use system proxy on Windows and OS X. This option has no effect on Linux.")));
+ QLatin1String("Use system proxy on Windows and Linux. This option has no effect on OS X.")));
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Script),
QLatin1String("Execute the script given as argument."), QLatin1String("file")));
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp
index a35f1a95a..cda9c932a 100644
--- a/src/sdk/main.cpp
+++ b/src/sdk/main.cpp
@@ -50,6 +50,11 @@
#include <iostream>
+#if defined(Q_OS_OSX)
+# include <unistd.h>
+# include <sys/types.h>
+#endif
+
#define QUOTE_(x) #x
#define QUOTE(x) QUOTE_(x)
#define VERSION "IFW Version: \"" QUOTE(IFW_VERSION_STR) "\""
@@ -144,6 +149,14 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+#if defined(Q_OS_OSX)
+ // make sure effective == real user id.
+ uid_t realUserId = getuid();
+ uid_t effectiveUserId = geteuid();
+ if (realUserId != effectiveUserId)
+ setreuid(effectiveUserId, -1);
+#endif
+
QInstaller::RemoteServer *server = new QInstaller::RemoteServer;
QObject::connect(server, SIGNAL(destroyed()), &app, SLOT(quit()));
server->init(socketName, key, (production ? QInstaller::Protocol::Mode::Production