This file is indexed.

/usr/share/gocode/src/github.com/opencontainers/runc/libcontainer/rootfs_linux_test.go is in golang-github-opencontainers-runc-dev 0.0.8+dfsg-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// +build linux

package libcontainer

import "testing"

func TestCheckMountDestOnProc(t *testing.T) {
	dest := "/rootfs/proc/"
	err := checkMountDestination("/rootfs", dest)
	if err == nil {
		t.Fatal("destination inside proc should return an error")
	}
}

func TestCheckMountDestInSys(t *testing.T) {
	dest := "/rootfs//sys/fs/cgroup"
	err := checkMountDestination("/rootfs", dest)
	if err != nil {
		t.Fatal("destination inside /sys should not return an error")
	}
}

func TestCheckMountDestFalsePositive(t *testing.T) {
	dest := "/rootfs/sysfiles/fs/cgroup"
	err := checkMountDestination("/rootfs", dest)
	if err != nil {
		t.Fatal(err)
	}
}

func TestCheckMountRoot(t *testing.T) {
	dest := "/rootfs"
	err := checkMountDestination("/rootfs", dest)
	if err == nil {
		t.Fatal(err)
	}
}