[oe] RFC: [PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd

Denys Dmytriyenko denis at denix.org
Mon Jun 22 17:44:45 UTC 2009


Having current directory (either '.' or empty string) in PATH is considered
dangerous for root.

Signed-off-by: Denys Dmytriyenko <denis at denix.org>
---
 recipes/base-files/base-files/profile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/recipes/base-files/base-files/profile b/recipes/base-files/base-files/profile
index 5797535..b5ce69d 100644
--- a/recipes/base-files/base-files/profile
+++ b/recipes/base-files/base-files/profile
@@ -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)
-- 
1.6.0.6





More information about the Openembedded-devel mailing list