Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Reset the umask while refreshing the vulnerabilities dat...



details:   https://anonhg.NetBSD.org/src/rev/2b301f76b035
branches:  trunk
changeset: 751193:2b301f76b035
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Wed Jan 27 16:22:41 2010 +0000

description:
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@.

diffstat:

 etc/daily |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 0a3bc7f53e1a -r 2b301f76b035 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."



Home | Main Index | Thread Index | Old Index