bug-bash
[Top][All Lists]
Advanced

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

Re: Environment parsed for Functions when invoked as rbash (and sh)


From: Chet Ramey
Subject: Re: Environment parsed for Functions when invoked as rbash (and sh)
Date: Fri, 03 Oct 2014 21:40:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 10/3/14, 5:37 PM, Paul FM wrote:

> Bash Version: 4.2
> Patch Level: 47
> Release Status: release
> 
> 
> 
> Description:
>     When run as rbash, it parses then environment for functions when the
> man page specifically says it does NOT do this.

Yeah, that's a documentation problem.  It's never behaved that way.  The
restrictions are enforced after startup files are read, which happens
after the environment is read.  The restricted shell isn't actually all
that restricted, anyway.

>         It is also UNEXPECTED for bash run as "sh" to import fuctions from
> the environment (which it also seems to do).

Maybe you don't expect it, but it's always behaved that way, and there's
no reason it shouldn't.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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