Skip to content

Commit c9320c4

Browse files
committed
Fix build on Windows and Plan9
Guess that didn't quite get renamed right and since CI is only tested on Linux I never noticed. Fixes #1251
1 parent 2809526 commit c9320c4

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

internal/pqutil/perm_unsupported.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22

33
package pqutil
44

5-
func sslKeyPermissions(string) error { return nil }
5+
import "errors"
6+
7+
var (
8+
ErrSSLKeyUnknownOwnership = errors.New("unused")
9+
ErrSSLKeyHasWorldPermissions = errors.New("unused")
10+
)
11+
12+
func SSLKeyPermissions(sslkey string) error { return nil }

internal/pqutil/user_windows.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import (
77
"syscall"
88
)
99

10-
// Perform Windows user name lookup identically to libpq.
11-
//
12-
// The PostgreSQL code makes use of the legacy Win32 function GetUserName, and
13-
// that function has not been imported into stock Go. GetUserNameEx is available
14-
// though, the difference being that a wider range of names are available. To
15-
// get the output to be the same as GetUserName, only the base (or last)
16-
// component of the result is returned.
1710
func User() (string, error) {
11+
// Perform Windows user name lookup identically to libpq.
12+
//
13+
// The PostgreSQL code makes use of the legacy Win32 function GetUserName,
14+
// and that function has not been imported into stock Go. GetUserNameEx is
15+
// available though, the difference being that a wider range of names are
16+
// available. To get the output to be the same as GetUserName, only the
17+
// base (or last) component of the result is returned.
1818
var (
1919
name = make([]uint16, 128)
2020
pwnameSz = uint32(len(name)) - 1

0 commit comments

Comments
 (0)