On a few occasions, I've found my acme.dump file overwritten with zero-length content. I suspect it happens when the machine is going down or under severe memory pressure, ending with the file created but not written to. Instead of opening and writing the file in place, create a temporary file alongside the destination, write to that, then rename it over the original. We take care to preserve the original permissions, although ownership might change (that's probably not an issue in practice). The underlying `mkstemp` call creates the temporary file without any access rights for group or other, so there shouldn't be any window of opportunity for an attacker to open it before the permissions are changed. Change-Id: Id0bc0e76c0acf5671c94b1b454cf23632b675586
This is a port of many Plan 9 libraries and programs to Unix.
Installation
To install, run ./INSTALL. It builds mk and then uses mk to run the rest of the installation.
For more details, see install(1), at install.txt in this directory and at https://9fans.github.io/plan9port/man/man1/install.html.
Documentation
See https://9fans.github.io/plan9port/man/ for more documentation. (Documentation is also in this tree, but you need to run a successful install first. After that, "9 man 1 intro".)
Intro(1) contains a list of man pages that describe new features or differences from Plan 9.
Helping out
If you'd like to help out, great!
If you port this code to other architectures, please share your changes so others can benefit.
Git
You can use Git to keep your local copy up-to-date as we make changes and fix bugs. See the git(1) man page here ("9 man git") for details on using Git.
Status
Contact
-
Mailing list: https://groups.google.com/group/plan9port-dev
-
Issue tracker: https://github.com/9fans/plan9port/issues
-
Submitting changes: https://github.com/9fans/plan9port/pulls
-
Russ Cox rsc@swtch.com