macOS doesn't like the test, in the setup where it creates a unix-domain
socket:
```
atomicfile_test.go:27: listen unix
/var/folders/_2/42v283xx1xgbjdbyvhlm13hc0000gp/T/TestDoesNotOverwriteIrregularFiles1507752327/001/special:
bind: invalid argument
```
I think at this point we should assume the socket
as written in the test only works on Linux.
Updates #7658
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
The intent of atomicfile is to overwrite regular files. Most use cases
that would overwrite irregular files, unix sockets, named pipes,
devices, and so on are more than likely misuse, so disallow them.
Fixes#7658
Signed-off-by: James Tucker <james@tailscale.com>
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com>
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
Reference: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>