Commit db1a97c2 authored by Ray Strode's avatar Ray Strode Committed by Ray Strode
Browse files

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.
parent 0349a77a
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment