/etc/profile incorrectly sources /etc/.profile.d/ content before setting PS1

Bug #881373 reported by Martin-Éric Racine
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

In its current form, /etc/profile sources the content of /etc/profile.d/ first and then sets PS1. This effectively prevents the administrator or a third-party package from setting PS1 by adding a file to /etc/profile.d/ and is therefore undesirable. The order of the code fragments for sourcing /etc/profile.d content and for setting the stock PS1 must thus be reversed.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: base-files 6.5ubuntu1
ProcVersionSignature: Ubuntu 3.1.0-1.1-generic 3.1.0-rc10
Uname: Linux 3.1.0-1-generic i586
ApportVersion: 1.24-0ubuntu1
Architecture: i386
Date: Tue Oct 25 14:26:05 2011
Dependencies:

SourcePackage: base-files
UpgradeStatus: Upgraded to precise on 2009-02-07 (990 days ago)

Related branches

Revision history for this message
Martin-Éric Racine (q-funk) wrote :
Changed in base-files (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Actually, comparing with the original Debian base-files 6.5's profile, I cannot see the reason for this diff.

Revision history for this message
Colin Watson (cjwatson) wrote :

This section of code was added a couple of years in advance of Debian. When the relevant Debian version was merged, it was incorrectly present twice. The wrong section was then removed in response to bug 790050.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 6.5ubuntu2

---------------
base-files (6.5ubuntu2) precise; urgency=low

  * share/profile: Fix incorrect ordering of /etc/profile.d handling vs. PS1
    check, bringing this more into line with Debian (LP: #881373).
 -- Colin Watson <email address hidden> Tue, 25 Oct 2011 14:28:47 +0100

Changed in base-files (Ubuntu):
status: New → Fix Released
Revision history for this message
agent 8131 (agent-8131) wrote :

I was just investigating this issue. Am I correct in assuming that this bug is present in all versions of Ubuntu at least from 10.04 through 11.04? Is there any chance other affected versions will be fixed. At the very least 10.04 should be fixed given its LTS status.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.