Merged PR 24828: Use mktemp to correctly use temp files

- It does use 700 permissions and create a random name, shouldn't need backports.
This commit is contained in:
Noah Gilson 2022-09-13 22:09:25 +00:00 committed by Daniel Plaisted
commit f1b49a0072
2 changed files with 2 additions and 3 deletions

View file

@ -4,6 +4,5 @@ first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
}
INSTALL_TEMP_HOME=/tmp/dotnet-installer
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run

View file

@ -12,7 +12,7 @@ first_run() {
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
}
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
HOME=$INSTALL_TEMP_HOME first_run
exit 0