diff options
author | joerg <joerg@pkgsrc.org> | 2009-11-03 02:14:32 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-11-03 02:14:32 +0000 |
commit | 1605f05f1ffc6b867528f36ada18965e45789fbd (patch) | |
tree | dda9c999af4c523d02bdcc3f1f949e096eac9616 /mk | |
parent | fa0129ec737ab4fa668de2ff03eb17a5e0b24278 (diff) | |
download | pkgsrc-1605f05f1ffc6b867528f36ada18965e45789fbd.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.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". |