kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <tobin@kernel.org>
To: Tycho Andersen <tycho@tycho.ws>
Cc: "Tobin C. Harding" <tobin@kernel.org>,
	kernel-hardening@lists.openwall.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] leaking_addresses: Expand tilde in output file name
Date: Thu, 14 Feb 2019 15:13:49 +1100	[thread overview]
Message-ID: <20190214041336.GA23878@eros.localdomain> (raw)
In-Reply-To: <20190207233555.GA5122@cisco>

On Thu, Feb 07, 2019 at 04:35:55PM -0700, Tycho Andersen wrote:
> On Fri, Feb 08, 2019 at 09:50:26AM +1100, Tobin C. Harding wrote:
> > Currently if user passes an output file to the script via
> > --output-raw we do not handle expansion of tilde.
> > 
> > Use perl function glob() to expand tilde in output file name.
> > 
> > Signed-off-by: Tobin C. Harding <tobin@kernel.org>
> > ---
> >  scripts/leaking_addresses.pl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
> > index ef9e5b2a1614..ce545ca3fb70 100755
> > --- a/scripts/leaking_addresses.pl
> > +++ b/scripts/leaking_addresses.pl
> > @@ -150,7 +150,7 @@ if (!(is_supported_architecture() or $opt_32bit or $page_offset_32bit)) {
> >  }
> >  
> >  if ($output_raw) {
> > -	open my $fh, '>', $output_raw or die "$0: $output_raw: $!\n";
> > +	open my $fh, '>', glob($output_raw) or die "$0: $output_raw: $!\n";
> 
> Seems like you might also have the same problem with $input_raw? I
> wonder if you can just do this in GetOptions somehow, so that all
> users of these further down in the script don't have to remember to do
> this.

I don't know what changed between now and when I first wrote this patch
(a fair while ago) but I just tested with bash and zsh _without_ this
patch and tilde was handled fine.

Dropping this patch, moving the other two onto leaks-next.

thanks,
Tobin.

  parent reply	other threads:[~2019-02-14  4:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 22:50 [PATCH 0/3] Minor bug fixes to leaking_addresses.pl Tobin C. Harding
2019-02-07 22:50 ` [PATCH 1/3] leaking_addresses: Fix calls to dprint Tobin C. Harding
2019-02-07 22:50 ` [PATCH 2/3] leaking_addresses: Completely remove --version flag Tobin C. Harding
2019-02-07 22:50 ` [PATCH 3/3] leaking_addresses: Expand tilde in output file name Tobin C. Harding
2019-02-07 23:35   ` Tycho Andersen
2019-02-09  6:01     ` Tobin C. Harding
2019-02-14  4:13     ` Tobin C. Harding [this message]
2019-02-13 15:56   ` David Laight
2019-02-13 20:30     ` Tobin C. Harding
2019-02-14  9:50       ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190214041336.GA23878@eros.localdomain \
    --to=tobin@kernel.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tycho@tycho.ws \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).