Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14736 > unrolled thread

RE: Environment variable "PS4" can not be passed to bash script from version 4.2.46(2)

Started by"Chen, Farrah" <farrah.chen@intel.com>
First post2018-10-24 04:29 +0000
Last post2018-10-24 04:29 +0000
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: Environment variable "PS4" can not be passed to bash script from version 4.2.46(2) "Chen, Farrah" <farrah.chen@intel.com> - 2018-10-24 04:29 +0000

#14736 — RE: Environment variable "PS4" can not be passed to bash script from version 4.2.46(2)

From"Chen, Farrah" <farrah.chen@intel.com>
Date2018-10-24 04:29 +0000
SubjectRE: Environment variable "PS4" can not be passed to bash script from version 4.2.46(2)
Message-ID<mailman.2648.1540355406.1284.bug-bash@gnu.org>
Got it, thanks for the info.


Thanks,
Fan



-----Original Message-----
From: Chet Ramey [mailto:chet.ramey@case.edu] 
Sent: Wednesday, October 24, 2018 4:48 AM
To: Chen, Farrah <farrah.chen@intel.com>; bug-bash@gnu.org
Cc: chet.ramey@case.edu
Subject: Re: Environment variable "PS4" can not be passed to bash script from version 4.2.46(2)

On 10/23/18 12:06 PM, Greg Wooledge wrote:
> On Tue, Oct 23, 2018 at 03:20:12PM +0000, Chen, Farrah wrote:
>> But in Bash script, it cannot work, it keeps its original value:
>> [root@fchen ~]# cat test.sh
>> #!/usr/bin/bash
>> echo $PS4
>> echo $FAN
> 
> This is because you're doing it as root.  Bash strips PS4 from the 
> environment when started as root, as a security precaution.

That change came in in bash-4.3 (patch 48). His vendor probably patched their version of bash-4.2 to do the same thing.

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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web