mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-03 02:17:01 -04:00
Set hardcoded file permissions to 0o600 (#153)
This commit is contained in:
parent
8e0f9491af
commit
772aa66fb4
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ func NewHandler(fs afero.Fs) Handler {
|
||||||
|
|
||||||
// Read reads the file given name and returns the bytes read.
|
// Read reads the file given name and returns the bytes read.
|
||||||
func (h *Handler) Read(name string) ([]byte, error) {
|
func (h *Handler) Read(name string) ([]byte, error) {
|
||||||
file, err := h.fs.OpenFile(name, os.O_RDONLY, 0o644)
|
file, err := h.fs.OpenFile(name, os.O_RDONLY, 0o600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ func (h *Handler) Write(name string, data []byte, options Option) error {
|
||||||
if options.Has(OptOverwrite) {
|
if options.Has(OptOverwrite) {
|
||||||
flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC
|
flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC
|
||||||
}
|
}
|
||||||
file, err := h.fs.OpenFile(name, flags, 0o644)
|
file, err := h.fs.OpenFile(name, flags, 0o600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue