diff options
author | James Fargher <jfargher@gitlab.com> | 2023-02-02 22:21:39 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2023-02-02 23:26:18 +0300 |
commit | 01bd57b688349b14b92437d7432b50a53231e555 (patch) | |
tree | a2e7f882c7a438a368aae8ab0ffb89bd96f67a42 /internal/gitaly/config/config.go | |
parent | fb2245e9f3644f9e63a47528a1195491d77e7366 (diff) |
Replace Mkdir(All) permissions with new perm package constants
There should be no actual permissions changes here. This is a
like-for-like replacement.
Diffstat (limited to 'internal/gitaly/config/config.go')
-rw-r--r-- | internal/gitaly/config/config.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/gitaly/config/config.go b/internal/gitaly/config/config.go index 7c1ceb621..1e11c95ab 100644 --- a/internal/gitaly/config/config.go +++ b/internal/gitaly/config/config.go @@ -20,6 +20,7 @@ import ( "gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config/prometheus" "gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config/sentry" "gitlab.com/gitlab-org/gitaly/v15/internal/helper/duration" + "gitlab.com/gitlab-org/gitaly/v15/internal/helper/perm" ) const ( @@ -634,7 +635,7 @@ func SetupRuntimeDirectory(cfg Cfg, processID int) (string, error) { } } - if err := os.Mkdir(runtimeDir, 0o700); err != nil { + if err := os.Mkdir(runtimeDir, perm.PrivateDir); err != nil { return "", fmt.Errorf("creating runtime directory: %w", err) } } @@ -647,7 +648,7 @@ func SetupRuntimeDirectory(cfg Cfg, processID int) (string, error) { // socket paths. We hope/expect that os.MkdirTemp creates a directory // that is not too deep. We need a directory, not a tempfile, because we // will later want to set its permissions to 0700 - if err := os.Mkdir(cfg.InternalSocketDir(), 0o700); err != nil { + if err := os.Mkdir(cfg.InternalSocketDir(), perm.PrivateDir); err != nil { return "", fmt.Errorf("create internal socket directory: %w", err) } |