about summary refs log tree commit diff
path: root/src/libutil/immutable.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-19T20·17-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-19T20·17-0400
commitb9c2b4d5b4cd5d52a950e6dd90eb2e2e79891fa0 (patch)
treee0f8f1b95570604fa64cd89fb53a50f44f72dcb0 /src/libutil/immutable.hh
parentb9124a5c336fd231adaa548cf5be311731847848 (diff)
Remove setting of the immutable bit
Using the immutable bit is problematic, especially in conjunction with
store optimisation.  For instance, if the garbage collector deletes a
file, it has to clear its immutable bit, but if the file has
additional hard links, we can't set the bit afterwards because we
don't know the remaining paths.

So now that we support having the entire Nix store as a read-only
mount, we may as well drop the immutable bit.  Unfortunately, we have
to keep the code to clear the immutable bit for backwards
compatibility.
Diffstat (limited to 'src/libutil/immutable.hh')
-rw-r--r--src/libutil/immutable.hh6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/libutil/immutable.hh b/src/libutil/immutable.hh
index 8af41900490f..8e98b76a41c5 100644
--- a/src/libutil/immutable.hh
+++ b/src/libutil/immutable.hh
@@ -4,12 +4,6 @@
 
 namespace nix {
 
-/* Make the given path immutable, i.e., prevent it from being modified
-   in any way, even by root.  This is a no-op on platforms that do not
-   support this, or if the calling user is not privileged.  On Linux,
-   this is implemented by doing the equivalent of ‘chattr +i path’. */
-void makeImmutable(const Path & path);
-
 /* Make the given path mutable. */
 void makeMutable(const Path & path);