summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-10-10 20:10:17 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-10-11 20:35:09 +0200
commit64b9d917ddaf5e7bff1169be27e97a00dec2302f (patch)
tree784c54b43e1ca41e4b13714ef114bd4722796eb6 /kde-frameworks/ktexteditor
parentkde-frameworks/extra-cmake-modules: allarches stable (diff)
downloadgentoo-64b9d917ddaf5e7bff1169be27e97a00dec2302f.tar.gz
gentoo-64b9d917ddaf5e7bff1169be27e97a00dec2302f.tar.bz2
gentoo-64b9d917ddaf5e7bff1169be27e97a00dec2302f.zip
kde-frameworks: Drop 5.46.0
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'kde-frameworks/ktexteditor')
-rw-r--r--kde-frameworks/ktexteditor/Manifest1
-rw-r--r--kde-frameworks/ktexteditor/files/ktexteditor-5.46.0-CVE-2018-10361.patch187
-rw-r--r--kde-frameworks/ktexteditor/ktexteditor-5.46.0-r1.ebuild58
3 files changed, 0 insertions, 246 deletions
diff --git a/kde-frameworks/ktexteditor/Manifest b/kde-frameworks/ktexteditor/Manifest
index 0fc5f95e9afa..7af22202edc5 100644
--- a/kde-frameworks/ktexteditor/Manifest
+++ b/kde-frameworks/ktexteditor/Manifest
@@ -1,2 +1 @@
-DIST ktexteditor-5.46.0.tar.xz 2296888 BLAKE2B 45572ff487505c38f6dfa23b96bd84ba83292ae1077bf3615fc2d30aaf6aa0347605a7c2ae4df68cc92552c1ecd8060ce1ba44f11bc78cfe736149476d6af5ab SHA512 b0197a82e9489c4093594c68a6c21dc9e204ec78cd17e5a0117d84e501710d90ad06214ed217332279f3b67ae84119d09d6eb19e33b37b7bde2ebb8a07b6a543
DIST ktexteditor-5.50.0.tar.xz 2247840 BLAKE2B 000f2e9f021d3e6275baafe0e70c7d24ef950e1d6ad13ecfc0ed7dc60ce09840a11401b3b6b00f1cddd3155ad4cde82fe93689a259af32efba1d01e8299509c4 SHA512 ab58d937d7b3e6374f7800fa81d52522a8fe73e67a222402b557b41770f1067348bb6b0e8a4e76cf4c983cc3e2e9df0760bd10791531b6d59cbd438c39e93537
diff --git a/kde-frameworks/ktexteditor/files/ktexteditor-5.46.0-CVE-2018-10361.patch b/kde-frameworks/ktexteditor/files/ktexteditor-5.46.0-CVE-2018-10361.patch
deleted file mode 100644
index d3b9b5d480ac..000000000000
--- a/kde-frameworks/ktexteditor/files/ktexteditor-5.46.0-CVE-2018-10361.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From c81af5aa1d4f6e0f8c44b2e85ca007ba2a1e4590 Mon Sep 17 00:00:00 2001
-From: Christoph Cullmann <cullmann@kde.org>
-Date: Thu, 7 Jun 2018 16:12:25 +0200
-Subject: CVE-2018-10361: privilege escalation
-
-improve handling of temporary file to avoid possible race-condition
-
-Differential Revision: https://phabricator.kde.org/D12513
----
- src/buffer/katesecuretextbuffer.cpp | 99 +++++++++++++++++--------------------
- src/buffer/katesecuretextbuffer_p.h | 4 --
- 2 files changed, 46 insertions(+), 57 deletions(-)
-
-diff --git a/src/buffer/katesecuretextbuffer.cpp b/src/buffer/katesecuretextbuffer.cpp
-index 0647bee..c014608 100644
---- a/src/buffer/katesecuretextbuffer.cpp
-+++ b/src/buffer/katesecuretextbuffer.cpp
-@@ -53,39 +53,37 @@ ActionReply SecureTextBuffer::savefile(const QVariantMap &args)
- bool SecureTextBuffer::saveFileInternal(const QString &sourceFile, const QString &targetFile,
- const QByteArray &checksum, const uint ownerId, const uint groupId)
- {
-- QFileInfo targetFileInfo(targetFile);
-- if (!QDir::setCurrent(targetFileInfo.dir().path())) {
-+ /**
-+ * open source file for reading
-+ * if not possible, signal error
-+ */
-+ QFile readFile(sourceFile);
-+ if (!readFile.open(QIODevice::ReadOnly)) {
- return false;
- }
-
-- // get information about target file
-- const QString targetFileName = targetFileInfo.fileName();
-- targetFileInfo.setFile(targetFileName);
-- const bool newFile = !targetFileInfo.exists();
--
-- // open source and target file
-- QFile readFile(sourceFile);
-- //TODO use QSaveFile for saving contents and automatic atomic move on commit() when QSaveFile's security problem
-- // (default temporary file permissions) is fixed
-- //
-- // We will first generate temporary filename and then use it relatively to prevent an attacker
-- // to trick us to write contents to a different file by changing underlying directory.
-- QTemporaryFile tempFile(targetFileName);
-+ /**
-+ * construct file info for target file
-+ * we need to know things like path/exists/permissions
-+ */
-+ const QFileInfo targetFileInfo(targetFile);
-+
-+ /**
-+ * create temporary file in current directory to be able to later do an atomic rename
-+ * we need to pass full path, else QTemporaryFile uses the temporary directory
-+ * if not possible, signal error, this catches e.g. a non-existing target directory, too
-+ */
-+ QTemporaryFile tempFile(targetFileInfo.absolutePath() + QStringLiteral("/secureXXXXXX"));
- if (!tempFile.open()) {
- return false;
- }
-- tempFile.close();
-- QString tempFileName = QFileInfo(tempFile).fileName();
-- tempFile.setFileName(tempFileName);
-- if (!readFile.open(QIODevice::ReadOnly) || !tempFile.open()) {
-- return false;
-- }
-- const int tempFileDescriptor = tempFile.handle();
-
-- // prepare checksum maker
-+ /**
-+ * copy contents + do checksumming
-+ * if not possible, signal error
-+ */
- QCryptographicHash cryptographicHash(checksumAlgorithm);
--
-- // copy contents
-+ const qint64 bufferLength = 4096;
- char buffer[bufferLength];
- qint64 read = -1;
- while ((read = readFile.read(buffer, bufferLength)) > 0) {
-@@ -95,30 +93,43 @@ bool SecureTextBuffer::saveFileInternal(const QString &sourceFile, const QString
- }
- }
-
-- // check that copying was successful and checksum matched
-- QByteArray localChecksum = cryptographicHash.result();
-- if (read == -1 || localChecksum != checksum || !tempFile.flush()) {
-+ /**
-+ * check that copying was successful and checksum matched
-+ * we need to flush the file, as QTemporaryFile keeps the handle open
-+ * and we later do things like renaming of the file!
-+ * if not possible, signal error
-+ */
-+ if ((read == -1) || (cryptographicHash.result() != checksum) || !tempFile.flush()) {
- return false;
- }
-
-- tempFile.close();
--
-- if (newFile) {
-+ /**
-+ * try to preserve the permissions
-+ */
-+ if (!targetFileInfo.exists()) {
- // ensure new file is readable by anyone
- tempFile.setPermissions(tempFile.permissions() | QFile::Permission::ReadGroup | QFile::Permission::ReadOther);
- } else {
- // ensure the same file permissions
- tempFile.setPermissions(targetFileInfo.permissions());
-+
- // ensure file has the same owner and group as before
-- setOwner(tempFileDescriptor, ownerId, groupId);
-+ setOwner(tempFile.handle(), ownerId, groupId);
- }
-
-- // rename temporary file to the target file
-- if (moveFile(tempFileName, targetFileName)) {
-+ /**
-+ * try to (atomic) rename temporary file to the target file
-+ */
-+ if (moveFile(tempFile.fileName(), targetFileInfo.filePath())) {
- // temporary file was renamed, there is nothing to remove anymore
- tempFile.setAutoRemove(false);
- return true;
- }
-+
-+ /**
-+ * we failed
-+ * QTemporaryFile will handle cleanup
-+ */
- return false;
- }
-
-@@ -141,28 +152,10 @@ bool SecureTextBuffer::moveFile(const QString &sourceFile, const QString &target
- {
- #if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID)
- const int result = std::rename(QFile::encodeName(sourceFile).constData(), QFile::encodeName(targetFile).constData());
-- if (result == 0) {
-- syncToDisk(QFile(targetFile).handle());
-- return true;
-- }
-- return false;
-+ return (result == 0);
- #else
- // use racy fallback for windows
- QFile::remove(targetFile);
- return QFile::rename(sourceFile, targetFile);
- #endif
- }
--
--void SecureTextBuffer::syncToDisk(const int fd)
--{
--#ifndef Q_OS_WIN
--#if HAVE_FDATASYNC
-- fdatasync(fd);
--#else
-- fsync(fd);
--#endif
--#else
-- // no-op for windows
--#endif
--}
--
-diff --git a/src/buffer/katesecuretextbuffer_p.h b/src/buffer/katesecuretextbuffer_p.h
-index a38285b..e00721c 100644
---- a/src/buffer/katesecuretextbuffer_p.h
-+++ b/src/buffer/katesecuretextbuffer_p.h
-@@ -56,8 +56,6 @@ public:
- static const QCryptographicHash::Algorithm checksumAlgorithm = QCryptographicHash::Algorithm::Sha512;
-
- private:
-- static const qint64 bufferLength = 4096;
--
- /**
- * Saves file contents using sets permissions.
- */
-@@ -66,8 +64,6 @@ private:
-
- static bool moveFile(const QString &sourceFile, const QString &targetFile);
-
-- static void syncToDisk(const int fd);
--
- public Q_SLOTS:
- /**
- * KAuth action to perform both prepare or move work based on given parameters.
---
-cgit v0.11.2
diff --git a/kde-frameworks/ktexteditor/ktexteditor-5.46.0-r1.ebuild b/kde-frameworks/ktexteditor/ktexteditor-5.46.0-r1.ebuild
deleted file mode 100644
index ab7450b249e3..000000000000
--- a/kde-frameworks/ktexteditor/ktexteditor-5.46.0-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-VIRTUALX_REQUIRED="test"
-inherit kde5
-
-DESCRIPTION="Framework providing a full text editor component"
-LICENSE="LGPL-2+"
-KEYWORDS="amd64 ~arm ~arm64 x86"
-IUSE="editorconfig git"
-
-RDEPEND="
- $(add_frameworks_dep karchive)
- $(add_frameworks_dep kauth)
- $(add_frameworks_dep kcodecs)
- $(add_frameworks_dep kcompletion)
- $(add_frameworks_dep kconfig)
- $(add_frameworks_dep kconfigwidgets)
- $(add_frameworks_dep kcoreaddons)
- $(add_frameworks_dep kguiaddons)
- $(add_frameworks_dep ki18n)
- $(add_frameworks_dep kiconthemes)
- $(add_frameworks_dep kio)
- $(add_frameworks_dep kitemviews)
- $(add_frameworks_dep kjobwidgets)
- $(add_frameworks_dep kparts)
- $(add_frameworks_dep ktextwidgets)
- $(add_frameworks_dep kwidgetsaddons)
- $(add_frameworks_dep kxmlgui)
- $(add_frameworks_dep sonnet)
- $(add_frameworks_dep syntax-highlighting)
- $(add_qt_dep qtdeclarative)
- $(add_qt_dep qtgui)
- $(add_qt_dep qtprintsupport)
- $(add_qt_dep qtwidgets)
- $(add_qt_dep qtxml)
- editorconfig? ( app-text/editorconfig-core-c )
- git? ( dev-libs/libgit2:= )
-"
-DEPEND="${RDEPEND}
- $(add_qt_dep qtxmlpatterns)
- test? ( $(add_frameworks_dep kservice) )
-"
-
-RESTRICT+=" test"
-
-PATCHES=( "${FILESDIR}/${P}-CVE-2018-10361.patch" )
-
-src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_find_package editorconfig EditorConfig)
- $(cmake-utils_use_find_package git LibGit2)
- )
-
- kde5_src_configure
-}