bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH v2 8/8] shell: restrict BASH_SOURCE_PATH when appropriate


From: Koichi Murase
Subject: Re: [PATCH v2 8/8] shell: restrict BASH_SOURCE_PATH when appropriate
Date: Wed, 15 May 2024 06:03:40 +0900

2024年5月15日(水) 4:55 Chet Ramey <chet.ramey@case.edu>:
> On 5/13/24 6:37 AM, Matheus Afonso Martins Moreira wrote:
> > Make the BASH_SOURCE_PATH variable read-only and unsettable
> > when the shell is operating in restricted mode. This variable
> > should be restricted for the same reasons why PATH is restricted.
>
> Or you could simply ignore BASH_SOURCE_PATH in restricted mode.

As I've already replied to the previous patch, I think we should
ignore BASH_SOURCE_PATH in the restricted mode. This will just become
a loophole if it's enabled. (Or, at least, this should be an opt-in
feature that the scripts to set up the restricted shells need to
explicitly turn on instead of being automatically enabled through the
existence of a variable BASH_SOURCE_PATH).  If it is automatically
turned on in the restricted shells, it implies that we change the list
of the items that the scripts to set up restricted shells need to care
about. All existing setups for the restricted shells would be spoiled.



reply via email to

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