|
|
|
@ -78,11 +78,12 @@ func parseConfig(configPath string) (configuration, error) {
|
|
|
|
|
return output, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check for file permissions. Must be 600.
|
|
|
|
|
// Check for file permissions. Must be 600 or 400.
|
|
|
|
|
perm := info.Mode().Perm()
|
|
|
|
|
if strconv.FormatInt(int64(perm), 8) != "600" {
|
|
|
|
|
permissions := strconv.FormatInt(int64(perm), 8)
|
|
|
|
|
if permissions != "600" && permissions != "400" {
|
|
|
|
|
return output, errors.New("Wrong permissions for " + configPath + ": " +
|
|
|
|
|
strconv.FormatInt(int64(perm), 8) + " instead of 600.")
|
|
|
|
|
permissions + " instead of 600.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Open config file.
|
|
|
|
|