go_bootstrap: Fix credential test for new user namespacing
This commit is contained in:
parent
b6f8b0d911
commit
3e1ad38909
@ -90,6 +90,7 @@ stdenv.mkDerivation rec {
|
|||||||
patches = [
|
patches = [
|
||||||
./remove-tools-1.4.patch
|
./remove-tools-1.4.patch
|
||||||
./new-binutils.patch
|
./new-binutils.patch
|
||||||
|
./creds-test-1.4.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||||
|
17
pkgs/development/compilers/go/creds-test-1.4.patch
Normal file
17
pkgs/development/compilers/go/creds-test-1.4.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/go-go1.4.3/src/syscall/creds_test.go b/go-go1.4.3/src/syscall/creds_test.go
|
||||||
|
index b1894c6..b2d6b4e 100644
|
||||||
|
--- a/src/syscall/creds_test.go
|
||||||
|
+++ b/src/syscall/creds_test.go
|
||||||
|
@@ -56,9 +56,10 @@ func TestSCMCredentials(t *testing.T) {
|
||||||
|
ucred.Gid = 0
|
||||||
|
oob := syscall.UnixCredentials(&ucred)
|
||||||
|
_, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
|
||||||
|
- if err.(*net.OpError).Err != syscall.EPERM {
|
||||||
|
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
|
||||||
|
+ if err.(*net.OpError).Err != syscall.EPERM && err.(*net.OpError).Err != syscall.EINVAL {
|
||||||
|
+ t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
|
||||||
|
}
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
ucred.Pid = int32(os.Getpid())
|
Loading…
x
Reference in New Issue
Block a user