vendor: opencontainers/runc v1.0.0-rc91-48-g67169a9d
full diff: https://github.com/opencontainers/runc/compare/v1.0.0-rc91...67169a9d43456ff0d5ae12b967acb8e366e2f181 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
		| @@ -37,7 +37,7 @@ github.com/Microsoft/go-winio                       v0.4.14 | |||||||
| github.com/Microsoft/hcsshim                        v0.8.9 | github.com/Microsoft/hcsshim                        v0.8.9 | ||||||
| github.com/opencontainers/go-digest                 v1.0.0 | github.com/opencontainers/go-digest                 v1.0.0 | ||||||
| github.com/opencontainers/image-spec                v1.0.1 | github.com/opencontainers/image-spec                v1.0.1 | ||||||
| github.com/opencontainers/runc                      v1.0.0-rc91 | github.com/opencontainers/runc                      67169a9d43456ff0d5ae12b967acb8e366e2f181 # v1.0.0-rc91-48-g67169a9d | ||||||
| github.com/opencontainers/runtime-spec              237cc4f519e2e8f9b235bacccfa8ef5a84df2875 # v1.0.2-14-g8e2f17c | github.com/opencontainers/runtime-spec              237cc4f519e2e8f9b235bacccfa8ef5a84df2875 # v1.0.2-14-g8e2f17c | ||||||
| github.com/pkg/errors                               v0.9.1 | github.com/pkg/errors                               v0.9.1 | ||||||
| github.com/prometheus/client_golang                 v1.6.0 | github.com/prometheus/client_golang                 v1.6.0 | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								vendor/github.com/opencontainers/runc/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/opencontainers/runc/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -4,7 +4,7 @@ go 1.14 | |||||||
|  |  | ||||||
| require ( | require ( | ||||||
| 	github.com/checkpoint-restore/go-criu/v4 v4.0.2 | 	github.com/checkpoint-restore/go-criu/v4 v4.0.2 | ||||||
| 	github.com/cilium/ebpf v0.0.0-20200507155900-a9f01edf17e3 | 	github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 | ||||||
| 	github.com/containerd/console v1.0.0 | 	github.com/containerd/console v1.0.0 | ||||||
| 	github.com/coreos/go-systemd/v22 v22.0.0 | 	github.com/coreos/go-systemd/v22 v22.0.0 | ||||||
| 	github.com/cyphar/filepath-securejoin v0.2.2 | 	github.com/cyphar/filepath-securejoin v0.2.2 | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -126,4 +126,11 @@ type Resources struct { | |||||||
|  |  | ||||||
| 	// CpuWeight sets a proportional bandwidth limit. | 	// CpuWeight sets a proportional bandwidth limit. | ||||||
| 	CpuWeight uint64 `json:"cpu_weight"` | 	CpuWeight uint64 `json:"cpu_weight"` | ||||||
|  |  | ||||||
|  | 	// SkipDevices allows to skip configuring device permissions. | ||||||
|  | 	// Used by e.g. kubelet while creating a parent cgroup (kubepods) | ||||||
|  | 	// common for many containers. | ||||||
|  | 	// | ||||||
|  | 	// NOTE it is impossible to start a container which has this flag set. | ||||||
|  | 	SkipDevices bool `json:"skip_devices"` | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,20 +1,15 @@ | |||||||
| package configs | package configs | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"errors" |  | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"os" | 	"os" | ||||||
| 	"strconv" | 	"strconv" | ||||||
|  |  | ||||||
| 	"golang.org/x/sys/unix" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const ( | const ( | ||||||
| 	Wildcard = -1 | 	Wildcard = -1 | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // TODO Windows: This can be factored out in the future |  | ||||||
|  |  | ||||||
| type Device struct { | type Device struct { | ||||||
| 	DeviceRule | 	DeviceRule | ||||||
|  |  | ||||||
| @@ -173,10 +168,3 @@ func (d *DeviceRule) CgroupString() string { | |||||||
| 	} | 	} | ||||||
| 	return fmt.Sprintf("%c %s:%s %s", d.Type, major, minor, d.Permissions) | 	return fmt.Sprintf("%c %s:%s %s", d.Type, major, minor, d.Permissions) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (d *DeviceRule) Mkdev() (uint64, error) { |  | ||||||
| 	if d.Major == Wildcard || d.Minor == Wildcard { |  | ||||||
| 		return 0, errors.New("cannot mkdev() device with wildcards") |  | ||||||
| 	} |  | ||||||
| 	return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil |  | ||||||
| } |  | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | // +build !windows | ||||||
|  |  | ||||||
|  | package configs | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	"errors" | ||||||
|  |  | ||||||
|  | 	"golang.org/x/sys/unix" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | func (d *DeviceRule) Mkdev() (uint64, error) { | ||||||
|  | 	if d.Major == Wildcard || d.Minor == Wildcard { | ||||||
|  | 		return 0, errors.New("cannot mkdev() device with wildcards") | ||||||
|  | 	} | ||||||
|  | 	return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil | ||||||
|  | } | ||||||
							
								
								
									
										5
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | package configs | ||||||
|  |  | ||||||
|  | func (d *DeviceRule) Mkdev() (uint64, error) { | ||||||
|  | 	return 0, nil | ||||||
|  | } | ||||||
							
								
								
									
										11
									
								
								vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -37,12 +37,12 @@ func DeviceFromPath(path, permissions string) (*configs.Device, error) { | |||||||
| 		major     = unix.Major(devNumber) | 		major     = unix.Major(devNumber) | ||||||
| 		minor     = unix.Minor(devNumber) | 		minor     = unix.Minor(devNumber) | ||||||
| 	) | 	) | ||||||
| 	switch { | 	switch mode & unix.S_IFMT { | ||||||
| 	case mode&unix.S_IFBLK == unix.S_IFBLK: | 	case unix.S_IFBLK: | ||||||
| 		devType = configs.BlockDevice | 		devType = configs.BlockDevice | ||||||
| 	case mode&unix.S_IFCHR == unix.S_IFCHR: | 	case unix.S_IFCHR: | ||||||
| 		devType = configs.CharDevice | 		devType = configs.CharDevice | ||||||
| 	case mode&unix.S_IFIFO == unix.S_IFIFO: | 	case unix.S_IFIFO: | ||||||
| 		devType = configs.FifoDevice | 		devType = configs.FifoDevice | ||||||
| 	default: | 	default: | ||||||
| 		return nil, ErrNotADevice | 		return nil, ErrNotADevice | ||||||
| @@ -104,6 +104,9 @@ func GetDevices(path string) ([]*configs.Device, error) { | |||||||
| 			} | 			} | ||||||
| 			return nil, err | 			return nil, err | ||||||
| 		} | 		} | ||||||
|  | 		if device.Type == configs.FifoDevice { | ||||||
|  | 			continue | ||||||
|  | 		} | ||||||
| 		out = append(out, device) | 		out = append(out, device) | ||||||
| 	} | 	} | ||||||
| 	return out, nil | 	return out, nil | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								vendor/github.com/opencontainers/runc/libcontainer/user/user.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/opencontainers/runc/libcontainer/user/user.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -60,7 +60,7 @@ type Group struct { | |||||||
|  |  | ||||||
| // groupFromOS converts an os/user.(*Group) to local Group | // groupFromOS converts an os/user.(*Group) to local Group | ||||||
| // | // | ||||||
| // (This does not include Pass, Shell or Gecos) | // (This does not include Pass or List) | ||||||
| func groupFromOS(g *user.Group) (Group, error) { | func groupFromOS(g *user.Group) (Group, error) { | ||||||
| 	newGroup := Group{ | 	newGroup := Group{ | ||||||
| 		Name: g.Name, | 		Name: g.Name, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Sebastiaan van Stijn
					Sebastiaan van Stijn