svn commit: r255406 - user/cperciva/freebsd-update-mirror
Colin Percival
cperciva at FreeBSD.org
Sun Sep 8 21:04:43 UTC 2013
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}" .
More information about the svn-src-user
mailing list