summaryrefslogtreecommitdiff
path: root/kde-apps/dolphin
diff options
context:
space:
mode:
Diffstat (limited to 'kde-apps/dolphin')
-rw-r--r--kde-apps/dolphin/Manifest6
-rw-r--r--kde-apps/dolphin/dolphin-18.04.3.ebuild (renamed from kde-apps/dolphin/dolphin-18.04.2.ebuild)6
-rw-r--r--kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch56
-rw-r--r--kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch45
4 files changed, 110 insertions, 3 deletions
diff --git a/kde-apps/dolphin/Manifest b/kde-apps/dolphin/Manifest
index 63bfca8b83f4..060806a9a049 100644
--- a/kde-apps/dolphin/Manifest
+++ b/kde-apps/dolphin/Manifest
@@ -1,6 +1,8 @@
AUX dolphin-18.04.1-flto.patch 3061 BLAKE2B d24d99f9cebd2979d6e0b6c8edb30b552601ba502937313395dae35e9c21c2ec6b1978eaf949cb87c5846ea6a12fe535b4fc849b3d7547c6c95c5b75c0cfc2d9 SHA512 7af21ea15381a460b08c02d5dee0bc1702a2a30c0b86b2b8f1b937783a199fb3b3cc1f76ee827ac15ca934d0e975ad2e702053369477afa35990423abe7e9d63
+AUX dolphin-18.04.3-root-user.patch 2198 BLAKE2B e92b053b53f7f1c2c6ce25eb7a81e8c26f5dc9497f9bff6e2d02d125c9b57b7722352d18ee4d0ea001b73a71904d729485544596904229700d4a29a240e1c28f SHA512 c9f419f67ffae57ccf057fb5aa7352e3fb652cec3a9a21459ae5d3e9fba0b1dede993058afe83ced5c3fc036c11649476bc25435a29bc5d910257443e21cb43a
+AUX dolphin-18.04.3-root-warn.patch 1488 BLAKE2B 8e9536926b0b9e9f37c0e2be7e23fafc60f34ca1e25ef83423097d49e5f575cb762008b6c4cbf2c8d664cdbd010db5ed52a15226e812c5988c2e3431770334a6 SHA512 ae763f8fcef45108f812bccdb485d8da31fd27997583195e612c2ded82f041441849ae680f20d7259b3621b9609d55ff12dc6b3044b993e8f3063a1abc85aebd
DIST dolphin-17.12.3.tar.xz 4841752 BLAKE2B 1f58cb0f1663e131a1b8dc58fc47d40a8a68bcb998fd3c6191f99176263523d40c1d9057b569c10c14e2a6b0be91b2eaaf07a54acdd386984d0da167cb84fabd SHA512 44cf8baaeead69dd5529ce7da96d78f507029fa47ac9ac50de9d77cb15335dd0b0e0c916f2cdd0d5cadc465e461115dbfd02c51af38d03da985d66bd22456136
-DIST dolphin-18.04.2.tar.xz 4850780 BLAKE2B 001fcd1f3fabfe449d5b6ac82763dcba0bfb3aa5303e54b2f72c105521deddd7f0264c435da9471cca5978d69afccb391810c1b6b4ee69f5f66f39034e8e1484 SHA512 760e698903717f30c08d69ae5872b1d42c523d6a554a6570cda6bfbd4fe2c37f2744e461728e7d090cfab6bed0055bf48b8cbb38128503386698f71c5d5f5198
+DIST dolphin-18.04.3.tar.xz 4850916 BLAKE2B 1d2a5c4f5e94e2f30055804d96c205eb2c03864ad2b6c245d917549986fbac26686e654818dacf93fcb711f59bfe6e7f3a011e578988f5bf9e6b6cb82fc33876 SHA512 167a35225dd4e75b7ff863771287a471273e0594c247ef058adc718682eb07f014ca84bc373e1c3a846e99711aad3d9a16b12aab8543aa3603e17f944b206b21
EBUILD dolphin-17.12.3.ebuild 2230 BLAKE2B 8e3d435eac7d521830bbd13122d7616bc5c54b786eef8386dad3c9b97447058a843d61c060308518c84e776787cdeb0e1b3399fc099f69faa6b7f055eae79c58 SHA512 b3999175d7bf0672fce3b697104b9fb024c9d0487dad8a40d1f37405ca7d611b2981a76629c024eb06cf7503c900a2a2d70c365d718fd8b173562103f1db975b
-EBUILD dolphin-18.04.2.ebuild 2284 BLAKE2B f4f3730c502944edc5ac5bccc02f9bbb9fc4f8ebfd80a383269e1d0621d8b60beb6f18da5d674188d7628503f72bb3ee8505c29ea03b88be9fe7483187250b37 SHA512 570affb49ecb45ee72d5b4217245fbc437b43f77ff4edb5a7380ba56c6ccead36b817a5afe355b299a8706e00fae82a7ab26c0a1951fba1f344eeaea1d23a4e7
+EBUILD dolphin-18.04.3.ebuild 2375 BLAKE2B 531782e4c620b2f1749ac3a3effe342feb3e01e0a7e1110ea7d023801ff70f48413406ff23060bf84be0afc0154e47eaa4e5a7542d78560b9b3da790dba7f15b SHA512 f3da766491d99c9469d08495c2889c475be17c903196f3e96c5cbd8da25fea970c44e90526809e70eba7aa8d7bac619c5f4cf445e3f892db309bc7ce9f7dd765
MISC metadata.xml 325 BLAKE2B 2526d5a76392c6c3ba96998586cab48d43c3bf87422c698fbfe009c398d2f84b13193f4cebd06e87b3f7856a83824e3ed3a34b902a437671fb9302de2af44674 SHA512 8a728d296c68f8046b32871bb185a467b1b03a25af3c026647d76b40d83d1f8ee959fac135b26ed1fdb3ec15cdb6c58c75d9fd128122331181530637e2d69169
diff --git a/kde-apps/dolphin/dolphin-18.04.2.ebuild b/kde-apps/dolphin/dolphin-18.04.3.ebuild
index 45f931da6b12..7688b7f2c3b5 100644
--- a/kde-apps/dolphin/dolphin-18.04.2.ebuild
+++ b/kde-apps/dolphin/dolphin-18.04.3.ebuild
@@ -62,7 +62,11 @@ RDEPEND="${DEPEND}
RESTRICT+=" test"
-PATCHES=( "${FILESDIR}/${PN}-18.04.1-flto.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-18.04.1-flto.patch"
+ "${FILESDIR}/${PN}-18.04.3-root-user.patch"
+ "${FILESDIR}/${PN}-18.04.3-root-warn.patch"
+)
src_configure() {
local mycmakeargs=(
diff --git a/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch b/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch
new file mode 100644
index 000000000000..04baafa1d8e8
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch
@@ -0,0 +1,56 @@
+From 40453cb627a39f1ff92373f865426f0bcdc83419 Mon Sep 17 00:00:00 2001
+From: Nathaniel Graham <nate@kde.org>
+Date: Wed, 9 May 2018 17:18:08 -0600
+Subject: Re-allow running Dolphin as the root user (but still not using sudo)
+
+Summary:
+Prohibiting the use of Dolphin as the actual root user (not using `sudo` or `kdesu`) breaks legitimate use cases for using the root user. An example is Kali, a distro that logs in as the root user by default as a deliberate design choice.
+
+In such an environment, there is no additional security vulnerability beyond what you're already potentially exposing yourself to. So, let's re-enable it.
+
+BUG: 387974
+FIXED-IN: 18.08.0
+
+Test Plan:
+- Log in as normal user and run `sudo dolphin`: you get an error message.
+- Log in as normal user and run `kdesu dolphin`: you get an error message.
+- Log in as the root user and run dolphin normally: it works.
+
+Reviewers: markg, elvisangelaccio, #dolphin
+
+Reviewed By: markg
+
+Subscribers: chinmoyr, cfeck, elvisangelaccio, mmustac, Fuchs, markg, graesslin, nicolasfella, zzag, kfm-devel, emmanuelp
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12795
+---
+ src/main.cpp | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index db52e11..75bab67 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -43,10 +43,15 @@
+ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
+ {
+ #ifndef Q_OS_WIN
+- // Check whether we are running as root
++ // Prohibit using sudo or kdesu (but allow using the root user directly)
+ if (getuid() == 0) {
+- std::cout << "Executing Dolphin as root is not possible." << std::endl;
+- return EXIT_FAILURE;
++ if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
++ std::cout << "Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
++ return EXIT_FAILURE;
++ } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
++ std::cout << "Executing Dolphin with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
++ return EXIT_FAILURE;
++ }
+ }
+ #endif
+
+--
+cgit v0.11.2
diff --git a/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch b/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch
new file mode 100644
index 000000000000..bd6e2ab0d815
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch
@@ -0,0 +1,45 @@
+From 621cd24acfec8cbed19e9aa6ff8650cd6f38f809 Mon Sep 17 00:00:00 2001
+From: Nathaniel Graham <nate@kde.org>
+Date: Sun, 6 May 2018 17:48:54 -0600
+Subject: Show a warning when running as the root user
+
+Summary: Now that Dolphin can be run as the root user again, let's show a warning.
+
+Test Plan:
+When run with the root user account:
+{F5882057}
+
+Reviewers: #dolphin, markg, elvisangelaccio
+
+Reviewed By: markg, elvisangelaccio
+
+Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12732
+---
+ src/dolphinviewcontainer.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
+index bf8ac88..7b99595 100644
+--- a/src/dolphinviewcontainer.cpp
++++ b/src/dolphinviewcontainer.cpp
+@@ -108,6 +108,14 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
+ m_messageWidget->setCloseButtonVisible(true);
+ m_messageWidget->hide();
+
++#ifndef Q_OS_WIN
++ if (getuid() == 0) {
++
++ // We must be logged in as the root user; show a big scary warning
++ showMessage(i18n("Running Dolphin as root can be dangerous. Please be careful."), Warning);
++ }
++#endif
++
+ m_view = new DolphinView(url, this);
+ connect(m_view, &DolphinView::urlChanged,
+ m_urlNavigator, &KUrlNavigator::setLocationUrl);
+--
+cgit v0.11.2