From: Henning Schild <henning.schild@siemens.com>
To: Baurzhan Ismagulov <ibr@radix50.net>
Cc: Anton Mikanovich <amikan@ilbers.de>,
<isar-users@googlegroups.com>, "Yuri Adamov" <yadamov@ilbers.de>
Subject: Re: [PATCH v2] isar-bootstrap: Run gpg-agent before starting apt-key
Date: Wed, 20 Jan 2021 12:27:48 +0100 [thread overview]
Message-ID: <20210120122748.14debc48@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20210120112008.GX22444@yssyq.m.ilbers.de>
Am Wed, 20 Jan 2021 12:20:08 +0100
schrieb Baurzhan Ismagulov <ibr@radix50.net>:
> On Wed, Jan 20, 2021 at 11:55:42AM +0100, Henning Schild wrote:
> > > + MY_GPGHOME=$(chroot "${ROOTFSDIR}" mktemp -d
> > > /tmp/gpghomeXXXXXXXXXX)
> ...
> > > + chroot "${ROOTFSDIR}" /bin/rm -rf "${MY_GPGHOME}"
> >
> > this should be guarded making sure MY_GPGHOME is indeed a directory
> > with a matching name ... would be a pity if for some reason it
> > would be i.e. "/usr" or even only "/tmp"
>
> That comes from mktemp -d. If that succeeds, my understanding is it's
> a directory. Or do I miss anything?
That is the impression you can get when reading the code. But under the
assumption that the script will indeed fail if mktemp fails, and that
nothing else overwrites the variable ... even by accident. Now and in
the future when people need to touch this code again.
Just a safeguard suggestion, i do not feel strong about it.
Henning
> With kind regards,
> Baurzhan.
prev parent reply other threads:[~2021-01-20 11:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 11:20 Anton Mikanovich
2021-01-19 12:54 ` Jan Kiszka
2021-01-19 14:24 ` Anton Mikanovich
2021-01-20 9:58 ` Jan Kiszka
2021-01-20 11:04 ` Henning Schild
2021-01-20 11:35 ` Baurzhan Ismagulov
2021-01-20 12:15 ` Henning Schild
2021-01-24 11:28 ` Baurzhan Ismagulov
2021-01-20 10:55 ` Henning Schild
2021-01-20 11:20 ` Baurzhan Ismagulov
2021-01-20 11:27 ` Henning Schild [this message]
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=20210120122748.14debc48@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=amikan@ilbers.de \
--cc=ibr@radix50.net \
--cc=isar-users@googlegroups.com \
--cc=yadamov@ilbers.de \
/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