$PATH is taken from login.defs not /etc/environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
shadow (Ubuntu) |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
Precise |
Won't Fix
|
Medium
|
Canonical Foundations Team | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned |
Bug Description
TEST CASE:
$PATH isn't sourced from /etc/environment, instead the version in
/etc/login.defs is used. (The example below comes from a precise install.)
| james@panlong:~$ echo $PATH
| /usr/local/
| james@panlong:~$ sudo su - buildd
| buildd@panlong:~$ echo $PATH
| /usr/local/
| buildd@panlong:~$ cat /etc/environment
| PATH="/
| buildd@panlong:~$ grep PATH /etc/login.defs
| # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
| # *REQUIRED* The default PATH settings, for superuser and normal users.
| ENV_SUPATH PATH=/usr/
| ENV_PATH PATH=/usr/
| #CRACKLIB_DICTPATH
| buildd@panlong:~$ sudo sed -i -e "s#^ENV_
| buildd@panlong:~$ logout
| james@panlong:~$ sudo su - buildd
| buildd@panlong:~$ echo $PATH
| /wtf:/usr/
| buildd@panlong:~$
REGRESSION POTENTIAL:
- medium: it changes (incorrect) existing behaviour so https:/
Changed in shadow (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in shadow (Ubuntu Precise): | |
status: | New → Triaged |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in shadow (Ubuntu Precise): | |
status: | Triaged → Won't Fix |
description: | updated |
Changed in shadow (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in shadow (Ubuntu Bionic): | |
importance: | Undecided → Medium |
description: | updated |
I pushed a slightly modified version of this to https:/ /github. com/shadow- maint/shadow/ pull/119