[Bug 1482641] [NEW] Lightdm (and GDM) source .profile as bash, indirectly sourcing .bashrc

Launchpad Bug Tracker 1482641 at bugs.launchpad.net
Fri Aug 7 16:22:24 UTC 2015


You have been subscribed to a public bug by Gunnar Hjalmarsson (gunnarhj):

The fix for https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/678421
leads to `.profile` being sourced by bash instead of dash. This leads
`.bashrc` being sourced indirectly via .profile. IMHO, `.bashrc` should
not be sourced even *once* in this situation. I suggest that sourcing
.profile actually be done with BASH_VERSION unset:

    BASH_VERSION= . "$CONFIG"

At the very least, a check should be done whether bash is the user's
login shell. It can  be done thus:

    [ "$SHELL" != "/bin/bash" ] && BASH_VERSION=
    . "$CONFIG"

utilizing `$SHELL` given it stores the login shell
(http://unix.stackexchange.com/questions/45458/why-shell-doesnt-change-
when-i-run-new-shell).

** Affects: gdm (Ubuntu)
     Importance: Medium
     Assignee: Gunnar Hjalmarsson (gunnarhj)
         Status: In Progress

** Affects: lightdm (Ubuntu)
     Importance: Medium
     Assignee: Gunnar Hjalmarsson (gunnarhj)
         Status: In Progress

-- 
Lightdm (and GDM) source .profile as bash, indirectly sourcing .bashrc
https://bugs.launchpad.net/bugs/1482641
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list