diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-09-09T21·19+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-09-09T21·19+0000 |
commit | c16be6ac92b86981e8e4bb6703e694b675a28b0d (patch) | |
tree | de83320fe46090f8c1f6957dcba7a2e5e579560d | |
parent | 47f87072ad42338a9b6397a250abf2775d051d8e (diff) |
* Remove write permission from store objects after they have been
added to the store. Bug reported by Martin.
-rw-r--r-- | src/libstore/store.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc index 5b471a1d9cd8..1f05b63a6cce 100644 --- a/src/libstore/store.cc +++ b/src/libstore/store.cc @@ -448,6 +448,8 @@ Path addToStore(const Path & _srcPath) copyPath(srcPath, dstPath); + makePathReadOnly(dstPath); + Transaction txn(nixDB); registerValidPath(txn, dstPath); txn.commit(); @@ -476,6 +478,8 @@ void addTextToStore(const Path & dstPath, const string & s) writeStringToFile(dstPath, s); + makePathReadOnly(dstPath); + Transaction txn(nixDB); registerValidPath(txn, dstPath); txn.commit(); |