diff --git a/0001-Fix-permissions-of-tmp-xauth-xxx-_y.patch b/0001-Fix-permissions-of-tmp-xauth-xxx-_y.patch deleted file mode 100644 index 69f5fcd..0000000 --- a/0001-Fix-permissions-of-tmp-xauth-xxx-_y.patch +++ /dev/null @@ -1,25 +0,0 @@ -From dece8fd89979cd1a86c03bcaceef6e9221e8d8cd Mon Sep 17 00:00:00 2001 -From: taro yamada -Date: Wed, 18 May 2016 00:08:09 +0200 -Subject: [PATCH] Fix permissions of /tmp/xauth-xxx-_y - -BUGS: 358593 ---- - src/kdeinit/kinit.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp -index ca18603..19e38b8 100644 ---- a/src/kdeinit/kinit.cpp -+++ b/src/kdeinit/kinit.cpp -@@ -1531,6 +1531,7 @@ static void setupX() - QSaveFile xauthfile(xauth); - QFile xauthfrom(QFile::decodeName(qgetenv("XAUTHORITY"))); - if (!xauthfrom.open(QFile::ReadOnly) || !xauthfile.open(QFile::WriteOnly) -+ || !xauthfile.setPermissions(QFile::ReadOwner | QFile::WriteOwner) - || xauthfile.write(xauthfrom.readAll()) != xauthfrom.size() || !xauthfile.commit()) { - // error - } else { --- -2.7.4 - diff --git a/0002-Fix-race-in-which-the-file-containing-the-X11-cookie.patch b/0002-Fix-race-in-which-the-file-containing-the-X11-cookie.patch deleted file mode 100644 index 7e934f0..0000000 --- a/0002-Fix-race-in-which-the-file-containing-the-X11-cookie.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 72f3702dbe6cf15c06dc13da2c99c864e9022a58 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Sat, 21 May 2016 17:48:36 +0200 -Subject: [PATCH 2/2] Fix race in which the file containing the X11 cookie has - the wrong permissions for a small while - -if someone is very fast can watch the file between the open and the setPermissions - -REVIEW: 127973 -Acked-by: mpyne ---- - src/kdeinit/kinit.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp -index 19e38b8..216c87e 100644 ---- a/src/kdeinit/kinit.cpp -+++ b/src/kdeinit/kinit.cpp -@@ -1530,13 +1530,15 @@ static void setupX() - + QString::number(getuid()) + QLatin1Char('-') + QString::fromLocal8Bit(display); - QSaveFile xauthfile(xauth); - QFile xauthfrom(QFile::decodeName(qgetenv("XAUTHORITY"))); -+ // Set umask to make sure the file permissions of xauthfile are correct -+ mode_t oldMask = umask(S_IRGRP | S_IROTH | S_IWGRP | S_IWOTH); - if (!xauthfrom.open(QFile::ReadOnly) || !xauthfile.open(QFile::WriteOnly) -- || !xauthfile.setPermissions(QFile::ReadOwner | QFile::WriteOwner) - || xauthfile.write(xauthfrom.readAll()) != xauthfrom.size() || !xauthfile.commit()) { - // error - } else { - qputenv("XAUTHORITY", QFile::encodeName(xauth)); - } -+ umask(oldMask); - } - } - --- -2.7.4 - diff --git a/kf5-kinit.spec b/kf5-kinit.spec index 4423e23..10a7518 100644 --- a/kf5-kinit.spec +++ b/kf5-kinit.spec @@ -21,8 +21,6 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{fra Source10: macros.kf5-kinit ## upstream patches -Patch1: 0001-Fix-permissions-of-tmp-xauth-xxx-_y.patch -Patch2: 0002-Fix-race-in-which-the-file-containing-the-X11-cookie.patch BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-kconfig-devel >= %{version}