This file is indexed.

/usr/share/gocode/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.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
// +build linux

package configs

import "syscall"

func (n *Namespace) Syscall() int {
	return namespaceInfo[n.Type]
}

var namespaceInfo = map[NamespaceType]int{
	NEWNET:  syscall.CLONE_NEWNET,
	NEWNS:   syscall.CLONE_NEWNS,
	NEWUSER: syscall.CLONE_NEWUSER,
	NEWIPC:  syscall.CLONE_NEWIPC,
	NEWUTS:  syscall.CLONE_NEWUTS,
	NEWPID:  syscall.CLONE_NEWPID,
}

// CloneFlags parses the container's Namespaces options to set the correct
// flags on clone, unshare. This functions returns flags only for new namespaces.
func (n *Namespaces) CloneFlags() uintptr {
	var flag int
	for _, v := range *n {
		if v.Path != "" {
			continue
		}
		flag |= namespaceInfo[v.Type]
	}
	return uintptr(flag)
}