diff options
author | joerg <joerg> | 2009-11-03 02:14:32 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-11-03 02:14:32 +0000 |
commit | 0518fe042d9b1c9c0bd405cf7404482b09b083c3 (patch) | |
tree | dda9c999af4c523d02bdcc3f1f949e096eac9616 | |
parent | cc8e9ed717dd6d8dacfe0efd358664a14f772bed (diff) | |
download | pkgsrc-0518fe042d9b1c9c0bd405cf7404482b09b083c3.tar.gz |
Create the work directory itself with umask 077 to prevent access to
files with broken permissions (e.g. world-writable files).
-rw-r--r-- | mk/bsd.pkg.mk | 5 |
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". |