Reset the umask while refreshing the vulnerabilities database so that it trunk
authorjmmv <jmmv@NetBSD.org>
Wed, 27 Jan 2010 16:22:41 +0000
branchtrunk
changeset 187526 4b850391b42d
parent 187525 fea6dd359166
child 187527 2119ae62d118
Reset the umask while refreshing the vulnerabilities database so that it remains world-readable. Otherwise, it ends up with 600 permissions which make it unusable for building pkgsrc packages as non-root. Problem found by wiz@.
etc/daily
--- a/etc/daily	Wed Jan 27 15:53:06 2010 +0000
+++ b/etc/daily	Wed Jan 27 16:22:41 2010 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.74 2010/01/20 22:19:20 jmmv Exp $
+#	$NetBSD: daily,v 1.75 2010/01/27 16:22:41 jmmv Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -248,7 +248,8 @@
 	echo ""
 	echo "Fetching package vulnerabilities database:"
 	if checkyesno fetch_pkg_vulnerabilities; then
-		pkg_admin -K ${pkgdb_dir} fetch-pkg-vulnerabilities -u
+		( umask 022 && pkg_admin -K ${pkgdb_dir} \
+		    fetch-pkg-vulnerabilities -u )
 	else
 		echo "fetch_pkg_vulnerabilities is set to NO in daily.conf(5)."
 		echo "You should set it to YES to enable vulnerability checks."