File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 44package setting
55
66import (
7+ "os"
78 "path/filepath"
89 "strings"
910 "text/template"
@@ -134,6 +135,11 @@ func loadSSHFrom(rootCfg ConfigProvider) {
134135 }
135136 }
136137
138+ // FIXME: why 0o644 for a directory .....
139+ if err := os .MkdirAll (GetSSHKeyTestPath (), 0o644 ); err != nil {
140+ log .Fatal ("failed to create directory %q for ssh key test: %w" , GetSSHKeyTestPath (), err )
141+ }
142+
137143 SSH .KeygenPath = sec .Key ("SSH_KEYGEN_PATH" ).String ()
138144 SSH .Port = sec .Key ("SSH_PORT" ).MustInt (22 )
139145 SSH .ListenPort = sec .Key ("SSH_LISTEN_PORT" ).MustInt (SSH .Port )
Original file line number Diff line number Diff line change @@ -32,11 +32,6 @@ func Init() error {
3232
3333 builtinUnused ()
3434
35- // FIXME: why 0o644 for a directory .....
36- if err := os .MkdirAll (setting .GetSSHKeyTestPath (), 0o644 ); err != nil {
37- return fmt .Errorf ("failed to create directory %q for ssh key test: %w" , setting .GetSSHKeyTestPath (), err )
38- }
39-
4035 if len (setting .SSH .TrustedUserCAKeys ) > 0 && setting .SSH .AuthorizedPrincipalsEnabled {
4136 caKeysFileName := setting .SSH .TrustedUserCAKeysFile
4237 caKeysFileDir := filepath .Dir (caKeysFileName )
You can’t perform that action at this time.
0 commit comments