summaryrefslogtreecommitdiff
path: root/x11-misc/sddm/files/sddm-0.20.0-no-default-pam_systemd-module.patch
blob: 2ad739a86761e72caf9150c6da0b07bcb27fd281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 02a13d11dac72699e7580c538c152a7b5e0eb056 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Tue, 13 Oct 2020 01:10:00 +0200
Subject: Don't add pam_systemd.so to pam.d/sddm-greeter in case of NO_SYSTEMD

---
 services/CMakeLists.txt      | 7 +++++--
 services/sddm-greeter.pam.in | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt
index 3d12eec..2ff13a8 100644
--- a/services/CMakeLists.txt
+++ b/services/CMakeLists.txt
@@ -4,10 +4,13 @@ if(SYSTEMD_FOUND)
     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sddm.service" DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}")
 endif()
 
+set(LOGIND_PAM_MODULE "session		optional")
 if(USE_ELOGIND)
-    set(LOGIND_PAM_MODULE "pam_elogind.so")
+    set(LOGIND_PAM_MODULE "${LOGIND_PAM_MODULE}	pam_elogind.so")
+elseif(NOT NO_SYSTEMD)
+    set(LOGIND_PAM_MODULE "${LOGIND_PAM_MODULE}	pam_systemd.so")
 else()
-    set(LOGIND_PAM_MODULE "pam_systemd.so")
+    set(LOGIND_PAM_MODULE "")
 endif()
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sddm-greeter.pam.in" "${CMAKE_CURRENT_BINARY_DIR}/sddm-greeter.pam")
 
diff --git a/services/sddm-greeter.pam.in b/services/sddm-greeter.pam.in
index d41792d..35dcfd5 100644
--- a/services/sddm-greeter.pam.in
+++ b/services/sddm-greeter.pam.in
@@ -14,4 +14,4 @@ password	required pam_deny.so
 
 # Setup session
 session		required pam_unix.so
-session		optional @LOGIND_PAM_MODULE@
+@LOGIND_PAM_MODULE@
-- 
2.35.1