Save the file with instructions how to restart portmaster after a failure

to non-world-writable directory.

Save this file in the user's home directory instead of in /tmp to prevent
a possible sym-link attack against the user.

PR:		233378
Submitted by:	Robert Schulze
Approved by:	antoine (implicit)
This commit is contained in:
Stefan Eßer 2020-01-26 20:22:32 +00:00
parent aed8c82ed5
commit a141fedd06
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=524231
2 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= portmaster
PORTVERSION= 3.19
PORTREVISION= 23
PORTREVISION= 24
CATEGORIES= ports-mgmt
MAINTAINER= se@FreeBSD.org

View File

@ -43,6 +43,21 @@
echo "===>>> Done displaying pkg-message files" ; echo '' ) | $PAGER ;;
esac
@@ -243,12 +245,12 @@ parent_exit () {
fi
if [ -n "$1" -a -n "${PM_NEEDS_UPDATE# }" -a -n "$PM_BUILDING" -a -z "$FETCH_ONLY" ]; then
- echo "$progname <flags>${PM_NEEDS_UPDATE}" > ${TMPDIR}/portmasterfail.txt
+ echo "$progname <flags>${PM_NEEDS_UPDATE}" > ~/portmasterfail.txt
echo ''
echo "===>>> You can restart from the point of failure with this command line:"
echo " $progname <flags>${PM_NEEDS_UPDATE}"
echo ''
- echo "This command has been saved to ${TMPDIR}/portmasterfail.txt"
+ echo "This command has been saved to ~/portmasterfail.txt"
echo ''
fi
}
@@ -260,7 +262,7 @@ safe_exit () {
parent_exit $1
else