1
0
Fork 0
forked from forgejo/forgejo

Update vendor github.com/lib/pq (#2752)

This commit is contained in:
Antoine GIRARD 2017-10-21 06:05:58 +02:00 committed by Lunny Xiao
parent d4c9399576
commit 2112eb8741
17 changed files with 898 additions and 371 deletions

20
vendor/github.com/lib/pq/ssl_permissions.go generated vendored Normal file
View file

@ -0,0 +1,20 @@
// +build !windows
package pq
import "os"
// sslKeyPermissions checks the permissions on user-supplied ssl key files.
// The key file should have very little access.
//
// libpq does not check key file permissions on Windows.
func sslKeyPermissions(sslkey string) error {
info, err := os.Stat(sslkey)
if err != nil {
return err
}
if info.Mode().Perm()&0077 != 0 {
return ErrSSLKeyHasWorldPermissions
}
return nil
}