Skip to content

Commit f982f38

Browse files
authored
Merge pull request #14718 from dotnet/nagilson-tempfix-7.0.1xx
[7.0.1xx] Use mktemp to correctly use temp files
2 parents 9bb8d11 + 12ce4c5 commit f982f38

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/redist/targets/packaging/deb/postinst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ first_run() {
44
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
55
}
66

7-
INSTALL_TEMP_HOME=/tmp/dotnet-installer
8-
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
7+
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
98
HOME=$INSTALL_TEMP_HOME first_run

src/redist/targets/packaging/osx/clisdk/scripts/postinstall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ first_run() {
1212
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
1313
}
1414

15-
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
15+
INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically
1616
HOME=$INSTALL_TEMP_HOME first_run
1717

1818
exit 0

0 commit comments

Comments
 (0)