From b008674e4616cd2596d8b02273deb52f8bcb7d6c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Feb 2013 16:35:46 +0100 Subject: Refactoring: Split off the non-recursive canonicalisePathMetaData() Also, change the file mode before changing the owner. This prevents a slight time window in which a setuid binary would be setuid root. --- src/libstore/optimise-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/optimise-store.cc') diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 75f2d7d6c..d833f3aa0 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -32,7 +32,7 @@ struct MakeReadOnly { try { /* This will make the path read-only. */ - if (path != "") canonicalisePathMetaData(path, false, -1); + if (path != "") canonicaliseTimestampAndPermissions(path); } catch (...) { ignoreException(); } -- cgit v1.2.3