From b54901af05eab6610d13161d70ff1d2dc3a3dd9613d76c060a4b8a0bda465ac1 Mon Sep 17 00:00:00 2001 From: Yifan Jiang Date: Tue, 8 Nov 2022 08:46:26 +0000 Subject: [PATCH] Accepting request 1034447 from home:yudaike:branches:X11:RemoteDesktop - Add xrdp-update-pam.d-path.patch (bsc#1203468) + Update pam.d path in install scripts to allow correct rule guess. OBS-URL: https://build.opensuse.org/request/show/1034447 OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/xrdp?expand=0&rev=102 --- xrdp-update-pam.d-path.patch | 35 +++++++++++++++++++++++++++++++++++ xrdp.changes | 7 +++++++ xrdp.spec | 3 +++ 3 files changed, 45 insertions(+) create mode 100644 xrdp-update-pam.d-path.patch diff --git a/xrdp-update-pam.d-path.patch b/xrdp-update-pam.d-path.patch new file mode 100644 index 0000000..e5f4f76 --- /dev/null +++ b/xrdp-update-pam.d-path.patch @@ -0,0 +1,35 @@ +From 76716169e3fe95b14c75b5571717b148b524909c Mon Sep 17 00:00:00 2001 +From: Daike Yu +Date: Mon, 7 Nov 2022 18:27:07 +0800 +Subject: [PATCH] Update pamdir_suse to accommodate with TW pam.d move +References: bsc#1203468 +Upstream: submitted + +On newer builds of openSUSE tumbleweed the path of pam.d has moved from +/usr/etc/pam.d to /usr/lib/pam.d, which prevents install script to +correctly guess pam rules. Updating path in mkpamrules solves the +problem. +--- + instfiles/pam.d/mkpamrules | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/instfiles/pam.d/mkpamrules b/instfiles/pam.d/mkpamrules +index 989a52f4..230d92be 100755 +--- a/instfiles/pam.d/mkpamrules ++++ b/instfiles/pam.d/mkpamrules +@@ -8,7 +8,11 @@ outfile="$3" + + service="xrdp-sesman" + pamdir="/etc/pam.d" +-pamdir_suse="/usr/etc/pam.d" ++pamdir_suse="/usr/lib/pam.d" ++if [ ! -d $pamdir_suse ]; then ++ # Older SUSE distros uses /usr/etc/pam.d ++ pamdir_suse="/usr/etc/pam.d" ++fi + + # Modules needed by xrdp-sesman.unix, if we get to that + unix_modules_needed="pam_unix.so pam_env.so pam_nologin.so" +-- +2.35.3 + diff --git a/xrdp.changes b/xrdp.changes index 8d35e0d..8e12a94 100644 --- a/xrdp.changes +++ b/xrdp.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 7 10:48:57 UTC 2022 - Daike Yu + +- Add xrdp-update-pam.d-path.patch (bsc#1203468) + + Update pam.d path in install scripts to allow correct rule + guess. + ------------------------------------------------------------------- Tue Oct 25 19:11:59 UTC 2022 - Michael Gorse diff --git a/xrdp.spec b/xrdp.spec index 712b34a..a8c19fe 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -52,6 +52,8 @@ Patch12: xrdp-filter-tab-from-mstsc-on-focus-change.patch Patch13: xrdp-bsc965647-allow-admin-choose-desktop.patch # PATCH-FEATURE-SLE xrdp-fate318398-change-expired-password.patch fate#318398 - fezhang@suse.com -- enable user to update expired password via PAM Patch14: xrdp-fate318398-change-expired-password.patch +# PATCH-FIX-UPSTREAM xrdp-update-pam.d-path.patch bsc#1203468 - yu.daike@suse.com -- update install script to accommodate with pam.d path move +Patch15: xrdp-update-pam.d-path.patch BuildRequires: autoconf BuildRequires: automake @@ -109,6 +111,7 @@ This package contains libraries for the JPEG2000 codec for RDP. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %endif %build