[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SHELLOPTS=xtrace security hardening
From: |
up201407890 |
Subject: |
Re: SHELLOPTS=xtrace security hardening |
Date: |
Tue, 15 Dec 2015 18:04:50 +0100 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.2) |
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.
- Re: SHELLOPTS=xtrace security hardening, (continued)
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/13
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/13
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/13
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening,
up201407890 <=
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/16
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/16