Wolfgang Bauer 2021-08-07 11:17:14 +00:00 committed by Git OBS Bridge
parent 291be6e577
commit 3d97bec60f
7 changed files with 74 additions and 33 deletions

View File

@ -1,4 +1,4 @@
From 435ed5853b9451ab8fdfff722545c57a8f154625 Mon Sep 17 00:00:00 2001 From bfe1b2dd63d410c8365b2197a313193ab29ebe5e Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de> From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sat, 18 Feb 2017 13:49:14 +0100 Date: Sat, 18 Feb 2017 13:49:14 +0100
Subject: [PATCH] Defuse root block Subject: [PATCH] Defuse root block
@ -8,16 +8,16 @@ X session (not sandboxed) can use kate's capability to open a console,
we allow (even encourage) running YaST on X11 as root. we allow (even encourage) running YaST on X11 as root.
That way it's only an impact on usability. That way it's only an impact on usability.
--- ---
kate/main.cpp | 3 +-- kate/main.cpp | 15 ++-------------
kwrite/main.cpp | 3 +-- kwrite/main.cpp | 15 ++-------------
2 files changed, 2 insertions(+), 4 deletions(-) 2 files changed, 4 insertions(+), 26 deletions(-)
Index: kate-19.11.70git.20210322T053556~5fffa661f/kate/main.cpp diff --git a/kate/main.cpp b/kate/main.cpp
=================================================================== index 5cdaa6c4d..042c0cfc8 100644
--- kate-19.11.70git.20210322T053556~5fffa661f.orig/kate/main.cpp 2021-03-22 06:53:49.515846104 +0100 --- a/kate/main.cpp
+++ kate-19.11.70git.20210322T053556~5fffa661f/kate/main.cpp 2021-03-22 06:55:33.758224989 +0100 +++ b/kate/main.cpp
@@ -48,19 +48,8 @@ @@ -48,19 +48,8 @@ int main(int argc, char **argv)
#ifndef Q_OS_WIN #if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
// Prohibit using sudo or kdesu (but allow using the root user directly) // Prohibit using sudo or kdesu (but allow using the root user directly)
if (getuid() == 0) { if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
@ -33,8 +33,37 @@ Index: kate-19.11.70git.20210322T053556~5fffa661f/kate/main.cpp
- << std::endl; - << std::endl;
- return EXIT_FAILURE; - return EXIT_FAILURE;
- } - }
+ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
}
#endif
/**
diff --git a/kwrite/main.cpp b/kwrite/main.cpp
index 4daa7c3a2..d3b83686c 100644
--- a/kwrite/main.cpp
+++ b/kwrite/main.cpp
@@ -40,19 +40,8 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
// Prohibit using sudo or kdesu (but allow using the root user directly)
if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities. "
- "It is also not necessary; simply use KWrite normally, and you will be prompted for "
- "elevated privileges when saving documents if needed."
- << std::endl;
- return EXIT_FAILURE;
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities. "
- "It is also not necessary; simply use KWrite normally, and you will be prompted for "
- "elevated privileges when saving documents if needed."
- << std::endl;
- return EXIT_FAILURE;
- }
+ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl; + std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl; + std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
} }
#endif #endif
/**
--
2.32.0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1072e0bd3aa77e42f6d55c24cc3cce12a841703d25d788abadab7e81b973acfd
size 7285624

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmEDnPIACgkQu0YzUNbv
Me9w5w//Sim0eKcf7WqwZ3kmVdthvElIxFejajmv79LAWLp8M9y+SDCLc7FWn0DD
6sduJWiR4htuojroysykhOzxTN/NRV7vvKhLuV03WxGaUfL+QB3q9a4wTbkGPF6f
WgZKgm7P7+YYGtC3c1oq/nf3LkhL839N32cWKMQCsNWy0nUj6U4bhBYzTSC2xiE9
Hvj0EzCVPomD2sFaRkNw8G40Olu0G6Mfy8Jkt+c5Irc7lMxgUvK3bxRa8CjbgOpp
UoSEri3ugSEnAy8V4W02bIXu3dhKwDnYQlO32c0EI7Lm1Y31uKeUTh1anoLqXM1P
kMhNSX7bMa0pctgK7WPjFSSmpyGLLHpI2UrjbucY1OWq9JAnmYpdUEpLWHPPvbXz
Ilo9ZkvmmfvK5empIh61OI0CimaBhFyWoiuQaN8EAyOIyyVgSmIsx/d3k2+3+J7j
0efVLH66uwCQuxmij1soEkPqR3Es/YCgb+2Crj/j8Ku6+Shc0PuDu8lkqo2ggX0M
h9v/DRtl6w5FBgCwkQx+QmnbxY/F3o3Yf24fccn/mTdKSWJ1LRnjOCjKer0IeAjw
OAT6LEQUp0YgpFqVPYJfELDYt4GZIxRe/9sDdP9ZY7gmQS32aySRUpbyK98OrYYn
pPuLPBK0/k191QY5+49BFvWQs2Pu5R2q3vKfaXIN33qukT8FFJw=
=mntg
-----END PGP SIGNATURE-----

3
kate-21.08.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:49272edb8b649c4ac558bd5e10b891a7c9807075007654397d74cc2b6cd567e8
size 7285604

16
kate-21.08.0.tar.xz.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmEMffcACgkQu0YzUNbv
Me876A/+KapX/cxNk/kXib5eSRixMbx147POzUgMzFIFIklAlhvS6g+eFQo0AkTM
Z7aRcqYRBPORBFKd85JcXY3NUDP8Gziv0Lr8pWYGihgnOxC/0Y0+CE9KsKt09foe
s7T/bKmBBjiruWk9YEH0jr+jWzzVFQkrk+fZlmYaoVkfXUXlugN2lwGJDgOHK+NJ
icIxbmUfRn0LhFm/1GV/j6qDFXZSBZFqCaOsPyJmR6ylOM/e+XLCWyHXOCn0HQdR
AkJY/NKp3jjU0UgIC25aYY5RKKLARuG4VeTANS2LCpdoeNvvT58vlbZnqC3al3hF
N2VXbKmZKrSfBCb8z6/fooJZ6zoC1g/o3zNW53Sx8so6p85LJGiuceux0RPJmeeG
2vspoBGRNv1o4i3p0y+3zBl4fkLpVQCFuutJGUIh98n91NsnioN2mBuukh7RD2d6
Rc9lvKnh3Gt3S99f+vxTFqrLCO7LytGYW5VSnaoA1oWtSJfEs04PooNhooxcKLgX
+6sPbJjB/xgeyCNmXv2JNrBlkBlOuYqJOb/ogDr1UVuD2JeKs67CjYVqgR74/eo0
3VO/2iqGPUI9UWYREvUX1nbKnzoKqYQ2g9QI/BtgPrYQGDp8bAVzpfgpn8Ra0JsC
hX/PJjyWEwYG+YQydbtHB4cDNhcUgF84KjZ2iv3xuQNATuZk+O8=
=K1pd
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Aug 6 09:36:12 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 21.08.0
* New feature release
* For more details please see:
* https://kde.org/announcements/gear/21.08/
- Changes since 21.07.90:
* improve kate on haiku os
* avoid double branch name computation
- Rebase 0001-Defuse-root-block.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 30 10:04:41 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr> Fri Jul 30 10:04:41 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -22,15 +22,15 @@
%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} %{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
%bcond_without lang %bcond_without lang
Name: kate Name: kate
Version: 21.07.90 Version: 21.08.0
Release: 0 Release: 0
Summary: Advanced Text Editor Summary: Advanced Text Editor
License: GPL-3.0-or-later License: GPL-3.0-or-later
Group: Productivity/Text/Editors Group: Productivity/Text/Editors
URL: https://kate-editor.org URL: https://kate-editor.org
Source: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz Source: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz
%if %{with lang} %if %{with lang}
Source1: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
Source2: applications.keyring Source2: applications.keyring
%endif %endif
# PATCH-FIX-OPENSUSE # PATCH-FIX-OPENSUSE