- Add patch to re-allow running dolphin as root:

* 0001-Revert-Disallow-executing-Dolphin-as-root-on-Linux.patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/dolphin?expand=0&rev=90
This commit is contained in:
Fabian Vogt 2017-04-22 12:02:27 +00:00 committed by Git OBS Bridge
parent 8e6c91af66
commit 62230a1e3a
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From ba74d639178916221c748b0d5d89f7ac4f5ed669 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sat, 22 Apr 2017 14:00:33 +0200
Subject: [PATCH] Revert "Disallow executing Dolphin as root on Linux"
This reverts commit 0bdd8e0b0516555c6233fdc7901e9b417cf89791.
We ship a desktop file to open dolphin as root and we allow YaST on the
desktop. So this patch is absolutely pointless for us.
---
src/main.cpp | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index 789a52996..acba8daed 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -35,21 +35,8 @@
#include <KLocalizedString>
#include <Kdelibs4ConfigMigrator>
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
-#ifndef Q_OS_WIN
- // Check whether we are running as root
- if (getuid() == 0) {
- std::cout << "Executing Dolphin as root is not possible." << std::endl;
- return EXIT_FAILURE;
- }
-#endif
-
QApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
--
2.12.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Apr 22 12:02:11 UTC 2017 - fabian@ritter-vogt.de
- Add patch to re-allow running dolphin as root:
* 0001-Revert-Disallow-executing-Dolphin-as-root-on-Linux.patch
-------------------------------------------------------------------
Sun Apr 16 10:44:46 CEST 2017 - lbeltrame@kde.org

View File

@ -31,6 +31,8 @@ Url: http://www.kde.org
Source: dolphin-%{version}.tar.xz
Source1: dolphinsu.desktop
Patch0: dolphin-go_up.diff
# PATCH-FIX-OPENSUSE
Patch1: 0001-Revert-Disallow-executing-Dolphin-as-root-on-Linux.patch
BuildRequires: baloo5-devel
BuildRequires: baloo5-widgets-devel
BuildRequires: extra-cmake-modules >= 1.6.0
@ -106,6 +108,7 @@ This package contains the libraries used by Dolphin and Konqueror.
%prep
%setup -q -n dolphin-%{version}
%patch0 -p1
%patch1 -p1
%build
%cmake_kf5 -d build