Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2013 21:04:43 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r255406 - user/cperciva/freebsd-update-mirror
Message-ID:  <201309082104.r88L4hO0061340@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sun Sep  8 21:04:43 2013
New Revision: 255406
URL: http://svnweb.freebsd.org/changeset/base/255406

Log:
  Refuse to package up files for publication if their permissions are set
  such that they will not be readable by the web server.

Modified:
  user/cperciva/freebsd-update-mirror/umirror-package.sh

Modified: user/cperciva/freebsd-update-mirror/umirror-package.sh
==============================================================================
--- user/cperciva/freebsd-update-mirror/umirror-package.sh	Sun Sep  8 20:48:23 2013	(r255405)
+++ user/cperciva/freebsd-update-mirror/umirror-package.sh	Sun Sep  8 21:04:43 2013	(r255406)
@@ -17,6 +17,14 @@ if [ -z "${ID}" ]; then
 	ID=`date "+%s"`
 fi
 
+# Check that the files we're publishing have publishable permissions
+if find "${PRIVDIR}" \! -perm -444 | grep -q .; then
+	echo "Files to be published have bad permissions:"
+	find "${PRIVDIR}" \! -perm -444
+	echo
+	echo "You should fix this before publishing them."
+fi
+
 # Create a tarball
 tar -cf "${PRIVDIR}/dec-${ID}" -C "${STAGEDIR}" .
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309082104.r88L4hO0061340>