mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
* Implement auditing support
* Document auditing
* Address review comments
* Change log level for errors reading audit config
* Disable auditors during tests
* Make changes to docs suggested by @jvehent
* Code review fixes to init() in audit.go
* Implement encrypt audit event
* Include filepath in Tree created from sops/encrypt/encrypt
* Fix changes in audit.go to stay with current style
* Implement RotateEvent within rotate command
* github.com/lib/pq vendor dependencies
* Always get current user in PostgresAuditor.Handle()
* Initial CR fixes + gofmt
* gofmt
* fixed placement of audit event in rotate()
* Moved to a single table for audit events.
* Revert "Moved to a single table for audit events."
This reverts commit 7e7817e8a1.
* Remove audit tables delete protection rules
* Move to a single audit_event table with action column
* Remove unnecessary tree declaration
21 lines
428 B
Go
21 lines
428 B
Go
// +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
|
|
}
|