Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #12028
| From | up201407890@alunos.dcc.fc.up.pt |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: SHELLOPTS=xtrace security hardening |
| Date | 2015-12-15 18:04 +0100 |
| Message-ID | <mailman.2176.1450199107.31583.bug-bash@gnu.org> (permalink) |
| References | (4 earlier) <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> |
Quoting "Chet Ramey" <chet.ramey@case.edu>: > 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 independent >>> 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 # make sure it's not there > > set -o history > HISTFILE="/tmp/history" > HISTSIZE="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="/tmp/history" > HISTSIZE="1000" > printf 'something\n' Quoting "Chet Ramey" <chet.ramey@case.edu>: > 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 independent >>> 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 # make sure it's not there > > set -o history > HISTFILE="/tmp/history" > HISTSIZE="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="/tmp/history" > HISTSIZE="1000" > printf 'something\n' $ cat x19 #!/bin/bash rm -f /tmp/history # make sure it's not there set -o history HISTFILE="/tmp/history" HISTSIZE="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.
Back to gnu.bash.bug | Previous | Next | Find similar
Re: SHELLOPTS=xtrace security hardening up201407890@alunos.dcc.fc.up.pt - 2015-12-15 18:04 +0100
csiph-web