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


Groups > gnu.bash.bug > #12027

Re: SHELLOPTS=xtrace security hardening

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: SHELLOPTS=xtrace security hardening
Date Tue, 15 Dec 2015 11:49:45 -0500
Lines 35
Approved bug-bash@gnu.org
Message-ID <mailman.2175.1450198203.31583.bug-bash@gnu.org> (permalink)
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>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1450198203 1091 208.118.235.17 (15 Dec 2015 16:50:03 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org, chet.ramey@case.edu
To up201407890@alunos.dcc.fc.up.pt, Stephane Chazelas <stephane.chazelas@gmail.com>
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
In-Reply-To <20151215173747.666455ueht7z5mw4@webmail.alunos.dcc.fc.up.pt>
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020206.567044A9.0341, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id 8b2b8409a0c3d95f9ae82e1c165e9db3
X-Junkmail-Whitelist YES (by domain whitelist at mpv2-2015.case.edu)
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020203.567044AA.01B8,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46
X-Mirapoint-Loop-Id 001cd25d62adbb7262945e883d8f0f64
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.103.227
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:12027

Show key headers only | View raw


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'



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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: SHELLOPTS=xtrace security hardening Chet Ramey <chet.ramey@case.edu> - 2015-12-15 11:49 -0500

csiph-web