summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-05 19:18:30 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-05 19:18:30 -0500
commit168b6b98479e50e8cbce07332670db3b1b0a1b52 (patch)
treeea26dfcad9834a8ad7c07a3e16f6e6ca5bc0c50f
parent86a0a7af557498e40fce447f6b0e80aa599318e2 (diff)
fix .metadata file perms after initial creation too
-rwxr-xr-xpre-commit.d/10store-metadata6
1 files changed, 4 insertions, 2 deletions
diff --git a/pre-commit.d/10store-metadata b/pre-commit.d/10store-metadata
index 7958888..b878abd 100755
--- a/pre-commit.d/10store-metadata
+++ b/pre-commit.d/10store-metadata
@@ -1,11 +1,13 @@
#!/bin/sh
set -e
+# Make sure the file is not readable by others, since it can leak
+# information about contents of non-readable directories in /etc.
+umask 077
+
# ensure the file exists so that it will list its own metadata
if [ ! -e .metadata ]; then
metastore --save
- # the file could leak hidden dir contents..
- chmod 600 .metadata
fi
# metastore doesn't produce the same output file for the same metadata