|
|
@ -1,23 +1,29 @@
|
|
|
|
From 6532fa6c875481566f4e98daf944627b75355613 Mon Sep 17 00:00:00 2001
|
|
|
|
From 4741f7d02a30cf3023dbd287d88a1ee9c9d71d10 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= <mbriza@redhat.com>
|
|
|
|
From: Rex Dieter <rdieter@gmail.com>
|
|
|
|
Date: Tue, 15 Aug 2017 17:23:56 +0200
|
|
|
|
Date: Wed, 6 Dec 2017 10:54:51 -0600
|
|
|
|
Subject: [PATCH] Port from xauth to libXau
|
|
|
|
Subject: [PATCH] Port from xauth to libXau
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rebase
|
|
|
|
|
|
|
|
https://github.com/sddm/sddm/pull/863
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As part of an effort to support
|
|
|
|
|
|
|
|
https://github.com/sddm/sddm/issues/733
|
|
|
|
|
|
|
|
and make sddm more resilient to hostname changes
|
|
|
|
---
|
|
|
|
---
|
|
|
|
CMakeLists.txt | 3 +++
|
|
|
|
CMakeLists.txt | 3 ++
|
|
|
|
cmake/FindXAU.cmake | 54 ++++++++++++++++++++++++++++++++++++++
|
|
|
|
cmake/FindXAU.cmake | 54 ++++++++++++++++++++++++++++++++++
|
|
|
|
src/daemon/CMakeLists.txt | 4 ++-
|
|
|
|
src/daemon/CMakeLists.txt | 4 ++-
|
|
|
|
src/daemon/XorgDisplayServer.cpp | 56 +++++++++++++++++++++++++++++-----------
|
|
|
|
src/daemon/XorgDisplayServer.cpp | 62 ++++++++++++++++++++++++++++++----------
|
|
|
|
src/helper/CMakeLists.txt | 5 +++-
|
|
|
|
src/helper/CMakeLists.txt | 2 +-
|
|
|
|
src/helper/UserSession.cpp | 52 +++++++++++++++++++++++++++----------
|
|
|
|
src/helper/UserSession.cpp | 55 ++++++++++++++++++++++++++---------
|
|
|
|
6 files changed, 143 insertions(+), 31 deletions(-)
|
|
|
|
6 files changed, 150 insertions(+), 30 deletions(-)
|
|
|
|
create mode 100644 cmake/FindXAU.cmake
|
|
|
|
create mode 100644 cmake/FindXAU.cmake
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 23e0383..abb9b7e 100644
|
|
|
|
index 005c9ad..f480b1c 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -88,6 +88,9 @@ find_package(XCB REQUIRED)
|
|
|
|
@@ -92,6 +92,9 @@ find_package(XCB REQUIRED)
|
|
|
|
# XKB
|
|
|
|
# XKB
|
|
|
|
find_package(XKB REQUIRED)
|
|
|
|
find_package(XKB REQUIRED)
|
|
|
|
|
|
|
|
|
|
|
@ -88,10 +94,10 @@ index 0000000..03cafb7
|
|
|
|
+ MARK_AS_ADVANCED(LIBXAU_INCLUDE_DIR LIBXAU_LIBRARIES)
|
|
|
|
+ MARK_AS_ADVANCED(LIBXAU_INCLUDE_DIR LIBXAU_LIBRARIES)
|
|
|
|
+ENDIF (NOT WIN32)
|
|
|
|
+ENDIF (NOT WIN32)
|
|
|
|
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
|
|
|
|
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
|
|
|
|
index 77fe55e..054d526 100644
|
|
|
|
index 9c3a582..4cc82a6 100644
|
|
|
|
--- a/src/daemon/CMakeLists.txt
|
|
|
|
--- a/src/daemon/CMakeLists.txt
|
|
|
|
+++ b/src/daemon/CMakeLists.txt
|
|
|
|
+++ b/src/daemon/CMakeLists.txt
|
|
|
|
@@ -39,7 +39,9 @@ target_link_libraries(sddm
|
|
|
|
@@ -57,7 +57,9 @@ target_link_libraries(sddm
|
|
|
|
Qt5::DBus
|
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Network
|
|
|
|
Qt5::Network
|
|
|
|
Qt5::Qml
|
|
|
|
Qt5::Qml
|
|
|
@ -103,10 +109,10 @@ index 77fe55e..054d526 100644
|
|
|
|
target_link_libraries(sddm ${PAM_LIBRARIES})
|
|
|
|
target_link_libraries(sddm ${PAM_LIBRARIES})
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
|
|
|
|
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
|
|
|
|
index 7656856..46e7452 100644
|
|
|
|
index b1a6788..5557005 100644
|
|
|
|
--- a/src/daemon/XorgDisplayServer.cpp
|
|
|
|
--- a/src/daemon/XorgDisplayServer.cpp
|
|
|
|
+++ b/src/daemon/XorgDisplayServer.cpp
|
|
|
|
+++ b/src/daemon/XorgDisplayServer.cpp
|
|
|
|
@@ -33,6 +33,7 @@
|
|
|
|
@@ -34,6 +34,7 @@
|
|
|
|
#include <random>
|
|
|
|
#include <random>
|
|
|
|
|
|
|
|
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
#include <xcb/xcb.h>
|
|
|
@ -114,7 +120,7 @@ index 7656856..46e7452 100644
|
|
|
|
|
|
|
|
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
@@ -87,28 +88,59 @@ namespace SDDM {
|
|
|
|
@@ -88,28 +89,59 @@ namespace SDDM {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void XorgDisplayServer::addCookie(const QString &file) {
|
|
|
|
void XorgDisplayServer::addCookie(const QString &file) {
|
|
|
@ -190,27 +196,23 @@ index 7656856..46e7452 100644
|
|
|
|
|
|
|
|
|
|
|
|
bool XorgDisplayServer::start() {
|
|
|
|
bool XorgDisplayServer::start() {
|
|
|
|
diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt
|
|
|
|
diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt
|
|
|
|
index 8163d94..3e76577 100644
|
|
|
|
index ebf4a6e..51d47ef 100644
|
|
|
|
--- a/src/helper/CMakeLists.txt
|
|
|
|
--- a/src/helper/CMakeLists.txt
|
|
|
|
+++ b/src/helper/CMakeLists.txt
|
|
|
|
+++ b/src/helper/CMakeLists.txt
|
|
|
|
@@ -27,7 +27,11 @@ else()
|
|
|
|
@@ -31,7 +31,7 @@ else()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
add_executable(sddm-helper ${HELPER_SOURCES})
|
|
|
|
add_executable(sddm-helper ${HELPER_SOURCES})
|
|
|
|
-target_link_libraries(sddm-helper Qt5::Network Qt5::DBus)
|
|
|
|
-target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml)
|
|
|
|
+target_link_libraries(sddm-helper
|
|
|
|
+target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml ${LIBXAU_LIBRARIES})
|
|
|
|
+ Qt5::Network
|
|
|
|
|
|
|
|
+ Qt5::DBus
|
|
|
|
|
|
|
|
+ ${LIBXAU_LIBRARIES}
|
|
|
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
if(PAM_FOUND)
|
|
|
|
if(PAM_FOUND)
|
|
|
|
target_link_libraries(sddm-helper ${PAM_LIBRARIES})
|
|
|
|
target_link_libraries(sddm-helper ${PAM_LIBRARIES})
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
diff --git a/src/helper/UserSession.cpp b/src/helper/UserSession.cpp
|
|
|
|
diff --git a/src/helper/UserSession.cpp b/src/helper/UserSession.cpp
|
|
|
|
index 587888d..8690cb0 100644
|
|
|
|
index 8166c93..066f754 100644
|
|
|
|
--- a/src/helper/UserSession.cpp
|
|
|
|
--- a/src/helper/UserSession.cpp
|
|
|
|
+++ b/src/helper/UserSession.cpp
|
|
|
|
+++ b/src/helper/UserSession.cpp
|
|
|
|
@@ -31,6 +31,9 @@
|
|
|
|
@@ -33,6 +33,9 @@
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
|
|
|
@ -220,7 +222,7 @@ index 587888d..8690cb0 100644
|
|
|
|
namespace SDDM {
|
|
|
|
namespace SDDM {
|
|
|
|
UserSession::UserSession(HelperApp *parent)
|
|
|
|
UserSession::UserSession(HelperApp *parent)
|
|
|
|
: QProcess(parent) {
|
|
|
|
: QProcess(parent) {
|
|
|
|
@@ -169,31 +172,57 @@
|
|
|
|
@@ -171,31 +174,57 @@ namespace SDDM {
|
|
|
|
if (!cookie.isEmpty()) {
|
|
|
|
if (!cookie.isEmpty()) {
|
|
|
|
QString file = processEnvironment().value(QStringLiteral("XAUTHORITY"));
|
|
|
|
QString file = processEnvironment().value(QStringLiteral("XAUTHORITY"));
|
|
|
|
QString display = processEnvironment().value(QStringLiteral("DISPLAY"));
|
|
|
|
QString display = processEnvironment().value(QStringLiteral("DISPLAY"));
|
|
|
@ -290,7 +292,7 @@ index 587888d..8690cb0 100644
|
|
|
|
+ fclose(fp);
|
|
|
|
+ fclose(fp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
--
|
|
|
|
2.13.4
|
|
|
|
2.14.3
|
|
|
|
|
|
|
|
|
|
|
|