RFC: [PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/base-files/base-files/profile +1 -1
@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here)
Signature · 1 line
1.6.0.6
Quoted 2 lines · Denys Dmytriyenko
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Agreed, having an empty element in there is a bad idea. I don't think any mainstream distribution does that.
FWIW, the equivalent from Debian's /etc/profile is:
if [ "id -u" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi
p.
Koen Kooi
Acked-byQuoted 4 lines · Denys Dmytriyenko
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko<[email protected]>
Quoted 17 lines
--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)recipes/base-files/base-files/profile +1
-1@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here)
Marcin Juszkiewicz
Acked-byDnia poniedziałek, 22 czerwca 2009 o 20:31:58 Koen Kooi napisał(a):
Quoted 6 lines
Quoted 4 lines
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko<[email protected]>Acked-by Koen Kooi <[email protected]>
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
Re: RFC: [PATCH] /etc/profile: stricter root PATH -requireabsolute pathname for bins in cwd
In reply to Denys DmytriyenkoShould this find its way back into Stable?
Quoted 14 lines · Denys Dmytriyenko
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)recipes/base-files/base-files/profile +0
-0
recipes/base-files/base-files/profile if [ ! -e /etc/localtime ]; then · line 18
Quoted 8 lines
recipes/base-files/base-files/profile +1
-1@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here)
=======================================================================
This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email.
Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission.
=======================================================================
PATCH 1/1 /etc/profile: stricter root PATH - require absolute pathname for bins in cwd
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/base-files/base-files/profile +1 -1
@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here)
Signature · 1 line
1.6.0.6
Re: [STABLE][PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd
Quoted 26 lines · Denys Dmytriyenko
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko <[email protected]>Acked-by Phil Blundell <[email protected]>Acked-by Koen Kooi <[email protected]>--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)recipes/base-files/base-files/profile +1
-1@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here)Signature · 1 line
1.6.0.6
ping?
Koen Kooi
Acked-byRe: [STABLE][PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd
Quoted 7 lines · Denys Dmytriyenko
Quoted 6 lines · Denys Dmytriyenko
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko<[email protected]>Acked-by Phil Blundell<[email protected]>Acked-by Koen Kooi<[email protected]>
Quoted 22 lines
Quoted 18 lines
--- recipes/base-files/base-files/profile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)recipes/base-files/base-files/profile +1
-2@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then fi if [ "`id -u`" -eq 0 ]; then - PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here) --Quoted 2 lines
1.6.0.6
ping?
Marcin Juszkiewicz
Acked-byRe: [STABLE][PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd
Dnia wtorek, 30 czerwca 2009 o 20:15:18 Koen Kooi napisał(a):
Quoted 10 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 6 lines
Having current directory (either '.' or empty string) in PATH is considered dangerous for root.
Signed-off-by Denys Dmytriyenko<[email protected]>Acked-by Phil Blundell<[email protected]>Acked-by Koen Kooi<[email protected]>Acked-by Koen Kooi <[email protected]>
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz