/etc/profile has bash scripting bug

Bug #683311 reported by nacitar sevaht
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Debian)
New
Undecided
Unassigned
base-files (Ubuntu)
In Progress
Medium
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

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Vish (vish) wrote :

Fabio Marconi , Any reason the Ubuntu task was closed?

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

This has nothing to do with bash-completion.

affects: bash-completion (Ubuntu) → ubuntu
Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

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

Revision history for this message
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.
Fabio

affects: ubuntu → casper (Ubuntu)
tags: added: lucid maverick natty
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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