Bash Version: 1.14
Patch Level: 6
Description:
bash 1.14.6 with HISTFILE exported.
If a shell script is executed, which "exec"s, the current history is
appended to $HISTFILE. This causes growth of $HISTFILE (only limited by
$HIST[FILE]SIZE), and big memory consumption for subshells.
Repeat-By:
$ bash -norc
bash$ export HISTFILE
bash$ rm -f $HISTFILE
bash$ echo 'exec /bin/ls' >/tmp/xxx
bash$ chmod +x /tmp/xxx
bash$ cat $HISTFILE
cat: /node/ra/louis/.bash_history: No such file or directory
bash$ /tmp/xxx
004 005 1 2 3 b0001 tools
bash$ cat $HISTFILE
export HISTFILE
rm $HISTFILE
echo 'exec /bin/ls' >/tmp/xxx
chmod +x /tmp/xxx
cat $HISTFILE
/tmp/xxx
bash$ /tmp/xxx
004 005 1 2 3 b0001 tools
bash$ cat $HISTFILE
export HISTFILE
rm $HISTFILE
echo 'exec /bin/ls' >/tmp/xxx
chmod +x /tmp/xxx
cat $HISTFILE
/tmp/xxx
export HISTFILE
rm $HISTFILE
echo 'exec /bin/ls' >/tmp/xxx
chmod +x /tmp/xxx
cat $HISTFILE
/tmp/xxx
cat $HISTFILE
/tmp/xxx
bash$ exit
This has already been fixed for the next major bash release.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, Case Western Reserve University Internet: ch...@po.CWRU.Edu