Merge branch 'sendxmpp-compatibility' into 'master'

Sendxmpp compatibility

See merge request mdosch-guest/go-sendxmpp!2
http_upload
Martin Dosch 6 years ago
commit ae19493f59

@ -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.

Loading…
Cancel
Save