bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory


From: Mikulas Patocka
Subject: Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory
Date: Sun, 1 Oct 2017 12:15:07 +0200 (CEST)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)


On Sat, 30 Sep 2017, L A Walsh wrote:

> 
> 
> Mikulas Patocka wrote:
> > I don't set up OLDPWD in /etc/profile.
> ---
>    No one does -- unless someone is trying to cause mischief.  It's not
> a likely event, but it would be annoying if someone did it. 
>    But, FWIW, -- it seems like not using 'tainted' values from the
> environment in a LOGIN SHELL, would be prudent. 
>    Is it that difficult to only clear previous OLDPWD and
> such when $0 == -bash (or when bash is about to read "/etc/bash_profile")?

The problem occurs even in non-login shells - the chrome browser is 
started from a bash script, on some distributions firefox is also started 
from a bash script, mail daemon may start a script specified in user's 
".forward" file. And these scripts also poke $OLDPWD and delay startup.

Mikulas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]