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

Koen Kooi k.kooi at student.utwente.nl
Mon Jun 22 18:31:58 UTC 2009


On 22-06-09 19:44, Denys Dmytriyenko wrote:
> Having current directory (either '.' or empty string) in PATH is considered
> dangerous for root.
>
> Signed-off-by: Denys Dmytriyenko<denis at denix.org>

Acked-by: Koen Kooi <koen at openembedded.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)






More information about the Openembedded-devel mailing list