[Pkg-golang-commits] [golang] 15/27: - Dropped d/patches/skip-userns-tests-when-chrooted.patch (included upstream).
Michael Hudson-Doyle
mwhudson-guest at moszumanska.debian.org
Tue Mar 1 02:57:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
mwhudson-guest pushed a commit to branch gbp
in repository golang.
commit 89815a50e80d2d3bb9cfd61d13f9e837c25186cf
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date: Fri Feb 12 10:30:18 2016 +1300
- Dropped d/patches/skip-userns-tests-when-chrooted.patch (included upstream).
---
debian/patches/series | 1 -
.../patches/skip-userns-tests-when-chrooted.patch | 37 ----------------------
2 files changed, 38 deletions(-)
diff --git a/debian/patches/series b/debian/patches/series
index 54ee857..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-skip-userns-tests-when-chrooted.patch
diff --git a/debian/patches/skip-userns-tests-when-chrooted.patch b/debian/patches/skip-userns-tests-when-chrooted.patch
deleted file mode 100644
index 15bd724..0000000
--- a/debian/patches/skip-userns-tests-when-chrooted.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: skip tests that create a user namespace when chrooted
-Origin: https://go.googlesource.com/go/+/21efa7b2bc872958bcb252f5ab4dc52b2b0abeae
-Applied-Upstream: commit:21efa7b2bc872958bcb252f5ab4dc52b2b0abeae
-
---- a/src/syscall/exec_linux_test.go
-+++ b/src/syscall/exec_linux_test.go
-@@ -17,6 +17,17 @@
- "testing"
- )
-
-+// Check if we are in a chroot by checking if the inode of / is
-+// different from 2 (there is no better test available to non-root on
-+// linux).
-+func isChrooted(t *testing.T) bool {
-+ root, err := os.Stat("/")
-+ if err != nil {
-+ t.Fatalf("cannot stat /: %v", err)
-+ }
-+ return root.Sys().(*syscall.Stat_t).Ino != 2
-+}
-+
- func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd {
- if _, err := os.Stat("/proc/self/ns/user"); err != nil {
- if os.IsNotExist(err) {
-@@ -24,6 +35,12 @@
- }
- t.Fatalf("Failed to stat /proc/self/ns/user: %v", err)
- }
-+ if isChrooted(t) {
-+ // create_user_ns in the kernel (see
-+ // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c)
-+ // forbids the creation of user namespaces when chrooted.
-+ t.Skip("cannot create user namespaces when chrooted")
-+ }
- cmd := exec.Command("whoami")
- cmd.SysProcAttr = &syscall.SysProcAttr{
- Cloneflags: syscall.CLONE_NEWUSER,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git
More information about the pkg-golang-commits
mailing list