about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-12-21T19·17+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-12-21T19·17+0000
commit2aac7cd0217ce3417b12574ca7f9930090da6c4c (patch)
tree795177c5cfcaf4b12f3b27c508a6bba0247e424b
parent4d728bc3e60a6d07858f7a881221688ccdebb7fe (diff)
* Another case of lock file permissions being too liberal.
-rw-r--r--src/libstore/pathlocks.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index d8290815c44c..645f4cd67e7e 100644
--- a/src/libstore/pathlocks.cc
+++ b/src/libstore/pathlocks.cc
@@ -16,7 +16,7 @@ int openLockFile(const Path & path, bool create)
 {
     AutoCloseFD fd;
 
-    fd = open(path.c_str(), O_RDWR | (create ? O_CREAT : 0), 0666);
+    fd = open(path.c_str(), O_RDWR | (create ? O_CREAT : 0), 0600);
     if (fd == -1 && (create || errno != ENOENT))
         throw SysError(format("opening lock file `%1%'") % path);