mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Merge pull request #129217 from tallclair/revert-129214-kubelet-state-perms
Revert "Change default filestore permissions to 0700"
This commit is contained in:
commit
21525f39e0
@ -28,9 +28,6 @@ import (
|
|||||||
const (
|
const (
|
||||||
// Name prefix for the temporary files.
|
// Name prefix for the temporary files.
|
||||||
tmpPrefix = "."
|
tmpPrefix = "."
|
||||||
|
|
||||||
// The default permission bits to set on the filestore directory.
|
|
||||||
directoryPerm = 0700
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// FileStore is an implementation of the Store interface which stores data in files.
|
// FileStore is an implementation of the Store interface which stores data in files.
|
||||||
@ -44,7 +41,7 @@ type FileStore struct {
|
|||||||
|
|
||||||
// NewFileStore returns an instance of FileStore.
|
// NewFileStore returns an instance of FileStore.
|
||||||
func NewFileStore(path string, fs utilfs.Filesystem) (Store, error) {
|
func NewFileStore(path string, fs utilfs.Filesystem) (Store, error) {
|
||||||
if err := fs.MkdirAll(path, directoryPerm); err != nil {
|
if err := fs.MkdirAll(path, 0755); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &FileStore{directoryPath: path, filesystem: fs}, nil
|
return &FileStore{directoryPath: path, filesystem: fs}, nil
|
||||||
@ -55,7 +52,7 @@ func (f *FileStore) Write(key string, data []byte) error {
|
|||||||
if err := ValidateKey(key); err != nil {
|
if err := ValidateKey(key); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := f.filesystem.MkdirAll(f.directoryPath, directoryPerm); err != nil {
|
if err := f.filesystem.MkdirAll(f.directoryPath, 0755); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user