summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg>2009-11-03 02:14:32 +0000
committerjoerg <joerg>2009-11-03 02:14:32 +0000
commitd3581b53d7beb0cfbf44b6709807a51ac68a6b4a (patch)
treedda9c999af4c523d02bdcc3f1f949e096eac9616 /mk
parent15f2ee5a13006768db7ce0db8396e5b74a1e4289 (diff)
downloadpkgsrc-d3581b53d7beb0cfbf44b6709807a51ac68a6b4a.tar.gz
Create the work directory itself with umask 077 to prevent access to
files with broken permissions (e.g. world-writable files).
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 7bd8a399aa8..7f43d2cd099 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1959 2009/09/10 21:46:57 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1960 2009/11/03 02:14:32 joerg Exp $
#
# This file is in the public domain.
#
@@ -563,7 +563,8 @@ ${WRKDIR}:
${RUN} ${TEST} -f ${_WRKDIR_LOCKFILE} || ${RM} -fr ${WRKDIR}
. endif
.endif
- ${RUN} ${MKDIR} ${WRKDIR}
+ ${RUN} ${MKDIR} ${WRKDIR:H}
+ ${RUN} umask 077 && ${MKDIR} ${WRKDIR}
# Create a symlink from ${WRKDIR} to the package directory if
# CREATE_WRKDIR_SYMLINK is "yes".