Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: up201407890@alunos.dcc.fc.up.pt Newsgroups: gnu.bash.bug Subject: Re: SHELLOPTS=xtrace security hardening Date: Tue, 15 Dec 2015 18:04:50 +0100 Lines: 87 Approved: bug-bash@gnu.org Message-ID: References: <20151210201649.126444eionzfsam8@webmail.alunos.dcc.fc.up.pt> <566DAFC6.4040407@case.edu> <20151213220817.GC7138@chaz.gmail.com> <20151214180113.169546iutu72yw9k@webmail.alunos.dcc.fc.up.pt> <20151214173231.GA6524@chaz.gmail.com> <20151215003016.598611ow5f3lw4qo@webmail.alunos.dcc.fc.up.pt> <20151215111627.GA6836@chaz.gmail.com> <20151215173747.666455ueht7z5mw4@webmail.alunos.dcc.fc.up.pt> <567044A9.6090903@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1450199107 1533 208.118.235.17 (15 Dec 2015 17:05:07 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Stephane Chazelas , bug-bash@gnu.org To: chet.ramey@case.edu Envelope-to: bug-bash@gnu.org In-Reply-To: <567044A9.6090903@case.edu> Content-Disposition: inline User-Agent: Internet Messaging Program (IMP) H3 (4.2) X-Virus-Scanned: amavisd-new at alunos.dcc.fc.up.pt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 193.136.39.109 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:12028 Quoting "Chet Ramey" : > On 12/15/15 11:37 AM, up201407890@alunos.dcc.fc.up.pt wrote: > >>> You just need to enable history (set -o history). History is independen= t >>> of whether or not the shell is interactive; it's just enabled by default >>> in interactive shells. >> >> doing a "set -o history" didn't work for me, only when i added a "history >> -a" eg: > > $ cat x19 > #!/bin/bash > > rm -f /tmp/history=09# make sure it's not there > > set -o history > HISTFILE=3D"/tmp/history" > HISTSIZE=3D"1000" > > printf 'something\n' > $ ../bash-4.3-patched/bash ./x19 > something > $ ls -l /tmp/history > -rw------- 1 chet wheel 61 Dec 15 11:48 /tmp/history > $ cat /tmp/history > HISTFILE=3D"/tmp/history" > HISTSIZE=3D"1000" > printf 'something\n' Quoting "Chet Ramey" : > On 12/15/15 11:37 AM, up201407890@alunos.dcc.fc.up.pt wrote: > >>> You just need to enable history (set -o history). History is independen= t >>> of whether or not the shell is interactive; it's just enabled by default >>> in interactive shells. >> >> doing a "set -o history" didn't work for me, only when i added a "history >> -a" eg: > > $ cat x19 > #!/bin/bash > > rm -f /tmp/history=09# make sure it's not there > > set -o history > HISTFILE=3D"/tmp/history" > HISTSIZE=3D"1000" > > printf 'something\n' > $ ../bash-4.3-patched/bash ./x19 > something > $ ls -l /tmp/history > -rw------- 1 chet wheel 61 Dec 15 11:48 /tmp/history > $ cat /tmp/history > HISTFILE=3D"/tmp/history" > HISTSIZE=3D"1000" > printf 'something\n' $ cat x19 #!/bin/bash rm -f /tmp/history # make sure it's not there set -o history HISTFILE=3D"/tmp/history" HISTSIZE=3D"1000" printf 'something\n' $ bash ./x19 something $ ls -l /tmp/history ls: cannot access /tmp/history: No such file or directory $ bash --version GNU bash, version 4.2.53(1)-release (x86_64-redhat-linux-gnu) Or did you just patch it, since you used "../bash-4.3-patched/bash ./x19" ? ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.