Use chmod to bypass umask on termination log file

os.Create() will obey the umask which results in the file being 0644
when injected in the container.
This commit is contained in:
Clayton Coleman
2017-01-02 22:27:51 -05:00
parent 244734171e
commit eff134cd5f
4 changed files with 32 additions and 4 deletions

View File

@@ -83,6 +83,11 @@ func (FakeOS) Create(path string) (*os.File, error) {
return nil, nil
}
// Chmod is a fake call that returns nil.
func (FakeOS) Chmod(path string, perm os.FileMode) error {
return nil
}
// Hostname is a fake call that returns nil.
func (f *FakeOS) Hostname() (name string, err error) {
return f.HostName, nil