summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-12-21 21:40:13 -0500
committerGraham Christensen <graham@grahamc.com>2016-12-21 21:40:29 -0500
commit3e1ad389092ac25069cb72efeb59aa40cd1ccca0 (patch)
tree2406da3514959c6889bf66ed2b4366791b1dc3bf /pkgs/development
parentb6f8b0d911cc8715c8c4782e1935aca170273a7b (diff)
downloadnixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar.gz
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar.bz2
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar.lz
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar.xz
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.tar.zst
nixlib-3e1ad389092ac25069cb72efeb59aa40cd1ccca0.zip
go_bootstrap: Fix credential test for new user namespacing
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/go/1.4.nix1
-rw-r--r--pkgs/development/compilers/go/creds-test-1.4.patch17
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix
index 273d768ce21f..3f0726e2aefa 100644
--- a/pkgs/development/compilers/go/1.4.nix
+++ b/pkgs/development/compilers/go/1.4.nix
@@ -90,6 +90,7 @@ stdenv.mkDerivation rec {
   patches = [
     ./remove-tools-1.4.patch
     ./new-binutils.patch
+    ./creds-test-1.4.patch
   ];
 
   GOOS = if stdenv.isDarwin then "darwin" else "linux";
diff --git a/pkgs/development/compilers/go/creds-test-1.4.patch b/pkgs/development/compilers/go/creds-test-1.4.patch
new file mode 100644
index 000000000000..98cec532dcca
--- /dev/null
+++ b/pkgs/development/compilers/go/creds-test-1.4.patch
@@ -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())