mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-12 13:10:25 +00:00
parent
8594c80856
commit
7696a9eb09
@ -86,10 +86,10 @@ func parseConfig(configPath string) (configuration, error) {
|
||||
// Only check file permissions if we are not running on windows.
|
||||
if runtime.GOOS != "windows" {
|
||||
info, _ := os.Stat(configPath)
|
||||
// Check for file permissions. Must be 600 or 400.
|
||||
// Check for file permissions. Must be 600, 640 or 400.
|
||||
perm := info.Mode().Perm()
|
||||
permissions := strconv.FormatInt(int64(perm), 8)
|
||||
if permissions != "600" && permissions != "400" {
|
||||
if permissions != "600" && permissions != "640" && permissions != "400" {
|
||||
return output, errors.New("Wrong permissions for " + configPath + ": " +
|
||||
permissions + " instead of 400 or 600.")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user