Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2012-09-19 | Remove setting of the immutable bit | Eelco Dolstra | 1 | -6/+0 | |
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. | |||||
2012-07-18 | Use "#pragma once" to prevent repeated header file inclusion | Eelco Dolstra | 1 | -4/+1 | |
2012-02-15 | On Linux, make the Nix store really read-only by using the immutable bit | Eelco Dolstra | 1 | -0/+19 | |
I was bitten one time too many by Python modifying the Nix store by creating *.pyc files when run as root. On Linux, we can prevent this by setting the immutable bit on files and directories (as in ‘chattr +i’). This isn't supported by all filesystems, so it's not an error if setting the bit fails. The immutable bit is cleared by the garbage collector before deleting a path. The only tricky aspect is in optimiseStore(), since it's forbidden to create hard links to an immutable file. Thus optimiseStore() temporarily clears the immutable bit before creating the link. |