This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f5749460aac806e286d7fbb4dc90ebcb2908600b

commit f5749460aac806e286d7fbb4dc90ebcb2908600b
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Mon Sep 6 04:49:25 2021 +0200

    dselect: Use safe temporary file creation in methods setup
    
    Use mktemp(1) instead of hardcoding a pathname under /run or /tmp,
    and then using the PID to try to "randomize" its filename.
---
 dselect/methods/disk/setup.sh    | 2 +-
 dselect/methods/multicd/setup.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dselect/methods/disk/setup.sh b/dselect/methods/disk/setup.sh
index 8ca898c0e..05fdc2f7e 100755
--- a/dselect/methods/disk/setup.sh
+++ b/dselect/methods/disk/setup.sh
@@ -19,7 +19,7 @@ method=$2
 option=$3
 
 cd "$vardir/methods/disk"
-tp=/var/run/ddm$$
+tp="$(mktemp --tmpdir $method.XXXXXXXXXX)"
 
 iarch=$(dpkg --admindir $vardir --print-architecture)
 
diff --git a/dselect/methods/multicd/setup.sh b/dselect/methods/multicd/setup.sh
index 4ed0956a4..57613f8fb 100755
--- a/dselect/methods/multicd/setup.sh
+++ b/dselect/methods/multicd/setup.sh
@@ -24,7 +24,7 @@ option=$3
 
 test -d "$vardir/methods/$method" || mkdir "$vardir/methods/$method"
 cd "$vardir/methods/$method"
-tp=/tmp/ddm$$
+tp="$(mktemp --tmpdir $method.XXXXXXXXXX)"
 
 iarch=$(dpkg --print-architecture)
 dist=stable

-- 
Dpkg.Org's dpkg

Reply via email to