/etc/profile has bash scripting bug

Bug #683311 reported by nacitar sevaht on 2010-11-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Debian)
base-files (Ubuntu)
Abhishek kumar singh

Bug Description

/etc/profile loops over scripts in /etc/profile.d/ and checks them for readability via "if [ -r $i ]; then", however if someone was to make a script with a space in the name, that wouldn't work, and thus you'd need "$i" instead of just $i... bad practice to use spaces in this case, but a bash script bug nonetheless. I can't figure out what package /etc/profile is part of, or how to report a "base system" sort of bug, but nonetheless this script is automatically provided by the distro and that's a (somewhat insignificant) bug. :)

Verified on ubuntu 10.04 LTS x64

Related branches

nacitar sevaht (nacitar) wrote :

Forgot... and the line just below that where the file gets sourced via ". $1" also needs spaces around the $1

Changed in ubuntu:
status: New → Invalid
Vish (vish) wrote :

Thank you for bringing this bug to our attention. However, a paper cut should be a small usability issue, in the default Ubuntu install, that affects many people and is quick and easy to fix. So this bug can't be addressed as part of this project.

 - Not an issue affecting an average user. Not a papercut.
For further information about papercuts criteria, please read https://wiki.ubuntu.com/PaperCut.
Don't worry though, this bug has been marked as "Invalid" only in the papercuts project.

Changed in hundredpapercuts:
status: New → Invalid
affects: hundredpapercuts → null
Vish (vish) wrote :

Fabio Marconi , Any reason the Ubuntu task was closed?

Changed in ubuntu:
status: Invalid → New
affects: ubuntu → bash-completion (Ubuntu)
Philip Muškovac (yofel) wrote :

This has nothing to do with bash-completion.

affects: bash-completion (Ubuntu) → ubuntu
Fabio Marconi (fabiomarconi) wrote :

My apologies
I've looked at /etc/profile.d directory instead /etc/profile file

Fabio Marconi (fabiomarconi) wrote :

I've not the ability to see if this can be a valid issue and how it can interfere, but as this file is copied as is from casper I assign to it.

affects: ubuntu → casper (Ubuntu)
tags: added: lucid maverick natty
Brian Murray (brian-murray) wrote :

Its actually base-files that contains this file.

Changed in casper (Ubuntu):
importance: Undecided → Medium
affects: casper (Ubuntu) → base-files (Ubuntu)
Changed in base-files (Ubuntu):
assignee: nobody → Abhishek kumar singh (abhishekkumarsingh-cse)
status: New → In Progress
no longer affects: null
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers