Commit Graph

5 Commits

Author SHA1 Message Date
Dmitry Vyukov
dbe573e3b8 pkg/osutil: always remove old file in Rename 2018-12-20 13:22:46 +01:00
Dmitry Vyukov
a9cc88c19f pkg/osutil: provide better Rename
os.Rename fails for cross-device renaming (e.g. to/from tmpfs).
This is quite unpleasant. Provide own version that falls back to copying.
2018-12-17 19:09:10 +01:00
Dmitry Vyukov
1b3ae9a6d0 pkg/report: handle syzkaller binaries
syzkallerNNN binaries are coming from pkg/repro.
2017-12-12 13:29:45 +01:00
Dmitry Vyukov
2181ef35e1 pkg/osutil: don't depend on syscall in appengine build
Dashboard app now depends on osutil through config package.
Reshuffle functions so that the package does not depend
on syscall in appengine build.
2017-07-03 14:43:37 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
Currently we have unix permissions for new files/dirs
hardcoded throughout the code base. Some places use 0644,
some - 0640, some - 0600 and a variety of other constants.

Introduce osutil.MkdirAll/WriteFile that use the default
permissions and use them throughout the code base.

This makes permissions consistent and also allows to easily
change the permissions later if we change our minds.

Also merge pkg/fileutil into pkg/osutil as they become
dependent on each other. The line between them was poorly
defined anyway as both operate on files.
2017-07-03 14:00:47 +02:00