vendor runc library to v1.0.0-rc91-48-g67169a9d
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
This commit is contained in:
		
							
								
								
									
										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 ( | ||||
| 	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/coreos/go-systemd/v22 v22.0.0 | ||||
| 	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 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 | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"os" | ||||
| 	"strconv" | ||||
|  | ||||
| 	"golang.org/x/sys/unix" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	Wildcard = -1 | ||||
| ) | ||||
|  | ||||
| // TODO Windows: This can be factored out in the future | ||||
|  | ||||
| type Device struct { | ||||
| 	DeviceRule | ||||
|  | ||||
| @@ -173,10 +168,3 @@ func (d *DeviceRule) CgroupString() string { | ||||
| 	} | ||||
| 	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) | ||||
| 		minor     = unix.Minor(devNumber) | ||||
| 	) | ||||
| 	switch { | ||||
| 	case mode&unix.S_IFBLK == unix.S_IFBLK: | ||||
| 	switch mode & unix.S_IFMT { | ||||
| 	case unix.S_IFBLK: | ||||
| 		devType = configs.BlockDevice | ||||
| 	case mode&unix.S_IFCHR == unix.S_IFCHR: | ||||
| 	case unix.S_IFCHR: | ||||
| 		devType = configs.CharDevice | ||||
| 	case mode&unix.S_IFIFO == unix.S_IFIFO: | ||||
| 	case unix.S_IFIFO: | ||||
| 		devType = configs.FifoDevice | ||||
| 	default: | ||||
| 		return nil, ErrNotADevice | ||||
| @@ -104,6 +104,9 @@ func GetDevices(path string) ([]*configs.Device, error) { | ||||
| 			} | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		if device.Type == configs.FifoDevice { | ||||
| 			continue | ||||
| 		} | ||||
| 		out = append(out, device) | ||||
| 	} | ||||
| 	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 | ||||
| // | ||||
| // (This does not include Pass, Shell or Gecos) | ||||
| // (This does not include Pass or List) | ||||
| func groupFromOS(g *user.Group) (Group, error) { | ||||
| 	newGroup := Group{ | ||||
| 		Name: g.Name, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jintao Zhang
					Jintao Zhang