mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
c75860918f
start_kdeinit reads its environment over a pipe from start_kdeinit_wrapper. For security, each environment entry must be smaller than 4kb by default. Qt-based applications in Nixpkgs may have larger environments, and the recent upgrade to Plasma 5.17 pushed start_kdeinit_wrapper over the limit. The limit is now extended to 16kb. This problem was not detected during testing because the failure is silent: start_kdeinit will continue with an empty environment. In other circumstances, this strategy might work, but it does not work on NixOS. This failure is now treated as a fatal error. Fixes: #79707
60 lines
1.8 KiB
Diff
60 lines
1.8 KiB
Diff
From 4f5d0de7e35744cdbfa9e280ee7e15a54cf21abb Mon Sep 17 00:00:00 2001
|
|
From: Thomas Tuegel <ttuegel@mailbox.org>
|
|
Date: Sun, 16 Feb 2020 14:24:07 -0600
|
|
Subject: [PATCH 3/4] kdeinit-extra-libs
|
|
|
|
---
|
|
src/kdeinit/kinit.cpp | 22 ++++------------------
|
|
1 file changed, 4 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp
|
|
index 0801b75..622dd5f 100644
|
|
--- a/src/kdeinit/kinit.cpp
|
|
+++ b/src/kdeinit/kinit.cpp
|
|
@@ -96,9 +96,9 @@ static const char *extra_libs[] = {
|
|
"libKF5Parts.5.dylib",
|
|
"libKF5Plasma.5.dylib"
|
|
#else
|
|
- "libKF5KIOCore.so.5",
|
|
- "libKF5Parts.so.5",
|
|
- "libKF5Plasma.so.5"
|
|
+ NIXPKGS_KF5_KIOCORE,
|
|
+ NIXPKGS_KF5_PARTS,
|
|
+ NIXPKGS_KF5_PLASMA
|
|
#endif
|
|
};
|
|
#endif
|
|
@@ -1524,20 +1524,6 @@ static int initXconnection()
|
|
}
|
|
#endif
|
|
|
|
-#ifndef Q_OS_OSX
|
|
-// Find a shared lib in the lib dir, e.g. libkio.so.
|
|
-// Completely unrelated to plugins.
|
|
-static QString findSharedLib(const QString &lib)
|
|
-{
|
|
- QString path = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/") + lib;
|
|
- if (QFile::exists(path)) {
|
|
- return path;
|
|
- }
|
|
- // We could also look in LD_LIBRARY_PATH, but really, who installs the main libs in different prefixes?
|
|
- return QString();
|
|
-}
|
|
-#endif
|
|
-
|
|
extern "C" {
|
|
|
|
static void secondary_child_handler(int)
|
|
@@ -1679,7 +1665,7 @@ int main(int argc, char **argv)
|
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
|
|
if (!d.suicide && qEnvironmentVariableIsEmpty("KDE_IS_PRELINKED")) {
|
|
for (const char *extra_lib : extra_libs) {
|
|
- const QString extra = findSharedLib(QString::fromLatin1(extra_lib));
|
|
+ const QString extra = QString::fromLatin1(extra_lib);
|
|
if (!extra.isEmpty()) {
|
|
QLibrary l(extra);
|
|
l.setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
|
--
|
|
2.23.1
|
|
|