diff --git a/SOURCES/0001-gnome-session-don-t-validate-shell-before-using-it.patch b/SOURCES/0001-gnome-session-don-t-validate-shell-before-using-it.patch new file mode 100644 index 0000000..d39e8cf --- /dev/null +++ b/SOURCES/0001-gnome-session-don-t-validate-shell-before-using-it.patch @@ -0,0 +1,57 @@ +From 63d74edc4b112669fdce14d88d37e2dd0315ff7e Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Tue, 19 Nov 2019 09:29:16 -0500 +Subject: [PATCH] gnome-session: don't validate shell before using it + +Users sometimes set their shell to an invalid shell to prevent +login from proceeding. + +GNOME on Wayland still allows login in these cases. + +This commit makes the behavior match expectations by skipping +shell validity checks when deciding to run though a login shell. +--- + gnome-session/gnome-session.in | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in +index ddd1a591..b4b1f8fa 100755 +--- a/gnome-session/gnome-session.in ++++ b/gnome-session/gnome-session.in +@@ -1,32 +1,29 @@ + #!/bin/sh + + if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && + [ "x$XDG_SESSION_CLASS" != "xgreeter" ] && +- [ -n "$SHELL" ] && +- grep -q "$SHELL" /etc/shells && +- ! (echo "$SHELL" | grep -q "false") && +- ! (echo "$SHELL" | grep -q "nologin"); then ++ [ -n "$SHELL" ]; then + if [ "$1" != '-l' ]; then + exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" + else + shift + fi + fi + + SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region) + REGION=${SETTING#\'} + REGION=${REGION%\'} + + if [ -n "$REGION" ]; then + unset LC_TIME LC_NUMERIC LC_MONETARY LC_MEASUREMENT LC_PAPER + + if [ "$LANG" != "$REGION" ] ; then + export LC_TIME=$REGION + export LC_NUMERIC=$REGION + export LC_MONETARY=$REGION + export LC_MEASUREMENT=$REGION + export LC_PAPER=$REGION + fi + fi + + exec @libexecdir@/gnome-session-binary "$@" +-- +2.32.0 + diff --git a/SPECS/gnome-session.spec b/SPECS/gnome-session.spec index fc539ed..af3e1a0 100644 --- a/SPECS/gnome-session.spec +++ b/SPECS/gnome-session.spec @@ -9,7 +9,7 @@ Name: gnome-session Version: 40.1.1 -Release: 4%{?dist}.1 +Release: 5%{?dist} Summary: GNOME session manager License: GPLv2+ @@ -19,15 +19,21 @@ Source1: gnome.desktop Source2: gnome-xorg.desktop # Blacklist NV30: https://bugzilla.redhat.com/show_bug.cgi?id=745202 -Patch1: gnome-session-3.3.92-nv30.patch -Patch3: gnome-session-3.6.2-swrast.patch +Patch10001: gnome-session-3.3.92-nv30.patch + +Patch20001: gnome-session-3.6.2-swrast.patch + # https://bugzilla.gnome.org/show_bug.cgi?id=772421 -Patch4: 0001-check-accelerated-gles-Use-eglGetPlatformDisplay-EXT.patch +Patch30001: 0001-check-accelerated-gles-Use-eglGetPlatformDisplay-EXT.patch + # For https://fedoraproject.org/w/index.php?title=Changes/HiddenGrubMenu # This should go upstream once systemd has a generic interface for this -Patch5: 0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch +Patch40001: 0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch + # subscription manager support -Patch6: subscription-manager-support.patch +Patch50001: subscription-manager-support.patch + +Patch60001: 0001-gnome-session-don-t-validate-shell-before-using-it.patch BuildRequires: meson BuildRequires: gcc @@ -139,13 +145,13 @@ cp $RPM_SOURCE_DIR/gnome-xorg.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome %{_userunitdir}/gnome-launched-.scope.d/ %changelog -* Wed Sep 15 2021 Kalev Lember - 40.1.1-4.1 -- Rebuilt -- Related: #2002166 +* Mon Oct 25 2021 Ray Strode - 40.1.1-5 +- Make users with nologin as their shell fail to login + Resolves: #2015519 * Mon Sep 06 2021 Kalev Lember - 40.1.1-4 - Forward port subscription manager support from RHEL 8 -- Resolves: #2002166 +- Resolves: #1937113 * Mon Aug 09 2021 Mohan Boddu - 40.1.1-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags