From: Ben Hutchings <ben@decadent.org.uk>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org,
Debian kernel maintainers <debian-kernel@lists.debian.org>,
Joerg Roedel <joerg.roedel@amd.com>,
Maximilian Attems <max@stro.at>
Subject: [PATCH] builddeb: Don't create files in /tmp with predictable names
Date: Wed, 15 Feb 2012 14:17:29 +0000 [thread overview]
Message-ID: <1329315449.3048.78.camel@deadeye> (raw)
The current use of /tmp for file lists is insecure. Put them under
$objtree/debian instead.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
---
Joerg, this will textually conflict with your changes. Sorry about
that, but I think it has to go ahead of them.
Ben.
scripts/package/builddeb | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f6cbc3d..3c6c0b1 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -238,14 +238,14 @@ EOF
fi
# Build header package
-(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$)
-(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$)
-(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
+(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
+(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
+(cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
mkdir -p "$destdir"
-(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
-(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
-rm -f /tmp/files$$ /tmp/objfiles$$
+(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
+(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
+rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
arch=$(dpkg --print-architecture)
cat <<EOF >> debian/control
--
1.7.9
next reply other threads:[~2012-02-15 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 14:17 Ben Hutchings [this message]
2012-02-15 15:24 ` [PATCH] builddeb: Don't create files in /tmp with predictable names Maximilian Attems
2012-02-15 16:36 ` Joerg Roedel
2012-02-18 21:34 ` Michal Marek
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=1329315449.3048.78.camel@deadeye \
--to=ben@decadent.org.uk \
--cc=debian-kernel@lists.debian.org \
--cc=joerg.roedel@amd.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=max@stro.at \
--cc=mmarek@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.