summaryrefslogtreecommitdiff
path: root/gnome-session
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2019-11-19 09:29:16 -0500
committerRay Strode <halfline@gmail.com>2022-01-12 14:31:33 +0000
commitdb1a97c2ffa091a37087cad15c759554e6fbb4ad (patch)
tree3c26e29bb593676a4d4c03a3094fe37ab7bb7ee9 /gnome-session
parent0349a77ad875b78b37700918308fc37b477777ae (diff)
downloadgnome-session-db1a97c2ffa091a37087cad15c759554e6fbb4ad.tar.gz
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.
Diffstat (limited to 'gnome-session')
-rwxr-xr-xgnome-session/gnome-session.in5
1 files changed, 1 insertions, 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
@@ -2,10 +2,7 @@
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