* [PATCH] builddeb: Don't create files in /tmp with predictable names
@ 2012-02-15 14:17 Ben Hutchings
2012-02-15 15:24 ` Maximilian Attems
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ben Hutchings @ 2012-02-15 14:17 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild, Debian kernel maintainers, Joerg Roedel,
Maximilian Attems
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] builddeb: Don't create files in /tmp with predictable names
2012-02-15 14:17 [PATCH] builddeb: Don't create files in /tmp with predictable names Ben Hutchings
@ 2012-02-15 15:24 ` Maximilian Attems
2012-02-15 16:36 ` Joerg Roedel
2012-02-18 21:34 ` Michal Marek
2 siblings, 0 replies; 4+ messages in thread
From: Maximilian Attems @ 2012-02-15 15:24 UTC (permalink / raw)
To: Michal Marek, linux-kbuild
Cc: Ben Hutchings, Debian kernel maintainers, Joerg Roedel
On Wed, Feb 15, 2012 at 02:17:29PM +0000, Ben Hutchings wrote:
> 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
Thanks Ben, this seems to have been added in
cd8d60a20a4516016c117ac0f1ac7b06ff606f7e so affects >= 3.0 stable trees.
Acked-by: maximilian attems <max@stro.at>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] builddeb: Don't create files in /tmp with predictable names
2012-02-15 14:17 [PATCH] builddeb: Don't create files in /tmp with predictable names Ben Hutchings
2012-02-15 15:24 ` Maximilian Attems
@ 2012-02-15 16:36 ` Joerg Roedel
2012-02-18 21:34 ` Michal Marek
2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2012-02-15 16:36 UTC (permalink / raw)
To: Ben Hutchings
Cc: Michal Marek, linux-kbuild, Debian kernel maintainers,
Maximilian Attems
On Wed, Feb 15, 2012 at 02:17:29PM +0000, Ben Hutchings wrote:
> 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.
No problem. It was easy to rebase. I am about to send a new version.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] builddeb: Don't create files in /tmp with predictable names
2012-02-15 14:17 [PATCH] builddeb: Don't create files in /tmp with predictable names Ben Hutchings
2012-02-15 15:24 ` Maximilian Attems
2012-02-15 16:36 ` Joerg Roedel
@ 2012-02-18 21:34 ` Michal Marek
2 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2012-02-18 21:34 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kbuild, Debian kernel maintainers, Joerg Roedel,
Maximilian Attems
On Wed, Feb 15, 2012 at 02:17:29PM +0000, Ben Hutchings wrote:
> 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
Thanks, applied. How could I have missed that bug :-/.
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-18 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 14:17 [PATCH] builddeb: Don't create files in /tmp with predictable names Ben Hutchings
2012-02-15 15:24 ` Maximilian Attems
2012-02-15 16:36 ` Joerg Roedel
2012-02-18 21:34 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox