diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2012-02-15 09:17:29 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-02-18 16:33:26 -0500 |
commit | 6c635224602d760c1208ada337562f40d8ae93a5 (patch) | |
tree | 8f8ce90866a8d6d5bd868a10ffd36dbc31630de3 /scripts/package | |
parent | 620c231c7a7f48745094727bb612f6321cfc8844 (diff) |
builddeb: Don't create files in /tmp with predictable names
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 # 2.6.39+
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package')
-rw-r--r-- | scripts/package/builddeb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f6cbc3ddb68b..3c6c0b14c807 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -238,14 +238,14 @@ EOF | |||
238 | fi | 238 | fi |
239 | 239 | ||
240 | # Build header package | 240 | # Build header package |
241 | (cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$) | 241 | (cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") |
242 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$) | 242 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") |
243 | (cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) | 243 | (cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") |
244 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version | 244 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version |
245 | mkdir -p "$destdir" | 245 | mkdir -p "$destdir" |
246 | (cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -) | 246 | (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) |
247 | (cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) | 247 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) |
248 | rm -f /tmp/files$$ /tmp/objfiles$$ | 248 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" |
249 | arch=$(dpkg --print-architecture) | 249 | arch=$(dpkg --print-architecture) |
250 | 250 | ||
251 | cat <<EOF >> debian/control | 251 | cat <<EOF >> debian/control |