mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Bump dependency syndtr/gocapability@v0.0.0-20180916011248-d98352740cb2
This commit is contained in:
parent
47906acc96
commit
6e079bfb7d
4
go.mod
4
go.mod
@ -118,7 +118,7 @@ require (
|
|||||||
github.com/spf13/viper v1.3.2
|
github.com/spf13/viper v1.3.2
|
||||||
github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc
|
github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc
|
||||||
github.com/stretchr/testify v1.3.0
|
github.com/stretchr/testify v1.3.0
|
||||||
github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4 // indirect
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect
|
||||||
github.com/thecodeteam/goscaleio v0.1.0
|
github.com/thecodeteam/goscaleio v0.1.0
|
||||||
github.com/urfave/negroni v1.0.0 // indirect
|
github.com/urfave/negroni v1.0.0 // indirect
|
||||||
github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e
|
github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e
|
||||||
@ -402,7 +402,7 @@ replace (
|
|||||||
github.com/storageos/go-api => github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc
|
github.com/storageos/go-api => github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc
|
||||||
github.com/stretchr/objx => github.com/stretchr/objx v0.2.0
|
github.com/stretchr/objx => github.com/stretchr/objx v0.2.0
|
||||||
github.com/stretchr/testify => github.com/stretchr/testify v1.3.0
|
github.com/stretchr/testify => github.com/stretchr/testify v1.3.0
|
||||||
github.com/syndtr/gocapability => github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4
|
github.com/syndtr/gocapability => github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
|
||||||
github.com/thecodeteam/goscaleio => github.com/thecodeteam/goscaleio v0.1.0
|
github.com/thecodeteam/goscaleio => github.com/thecodeteam/goscaleio v0.1.0
|
||||||
github.com/tmc/grpc-websocket-proxy => github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
|
github.com/tmc/grpc-websocket-proxy => github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
|
||||||
github.com/ugorji/go/codec => github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8
|
github.com/ugorji/go/codec => github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8
|
||||||
|
4
go.sum
4
go.sum
@ -413,8 +413,8 @@ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
|
|||||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4 h1:w58e6FAOMd+rUgOfhaBb+ZVOQIOfUkpv5AAQVmf6hsI=
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=
|
||||||
github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/thecodeteam/goscaleio v0.1.0 h1:SB5tO98lawC+UK8ds/U2jyfOCH7GTcFztcF5x9gbut4=
|
github.com/thecodeteam/goscaleio v0.1.0 h1:SB5tO98lawC+UK8ds/U2jyfOCH7GTcFztcF5x9gbut4=
|
||||||
github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM=
|
github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM=
|
||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
|
||||||
|
71
vendor/github.com/syndtr/gocapability/capability/capability.go
generated
vendored
71
vendor/github.com/syndtr/gocapability/capability/capability.go
generated
vendored
@ -60,13 +60,74 @@ type Capabilities interface {
|
|||||||
Apply(kind CapType) error
|
Apply(kind CapType) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPid create new initialized Capabilities object for given pid when it
|
// NewPid initializes a new Capabilities object for given pid when
|
||||||
// is nonzero, or for the current pid if pid is 0
|
// it is nonzero, or for the current process if pid is 0.
|
||||||
|
//
|
||||||
|
// Deprecated: Replace with NewPid2. For example, replace:
|
||||||
|
//
|
||||||
|
// c, err := NewPid(0)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// with:
|
||||||
|
//
|
||||||
|
// c, err := NewPid2(0)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
// err = c.Load()
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
func NewPid(pid int) (Capabilities, error) {
|
func NewPid(pid int) (Capabilities, error) {
|
||||||
|
c, err := newPid(pid)
|
||||||
|
if err != nil {
|
||||||
|
return c, err
|
||||||
|
}
|
||||||
|
err = c.Load()
|
||||||
|
return c, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPid2 initializes a new Capabilities object for given pid when
|
||||||
|
// it is nonzero, or for the current process if pid is 0. This
|
||||||
|
// does not load the process's current capabilities; to do that you
|
||||||
|
// must call Load explicitly.
|
||||||
|
func NewPid2(pid int) (Capabilities, error) {
|
||||||
return newPid(pid)
|
return newPid(pid)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFile create new initialized Capabilities object for given named file.
|
// NewFile initializes a new Capabilities object for given file path.
|
||||||
func NewFile(name string) (Capabilities, error) {
|
//
|
||||||
return newFile(name)
|
// Deprecated: Replace with NewFile2. For example, replace:
|
||||||
|
//
|
||||||
|
// c, err := NewFile(path)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// with:
|
||||||
|
//
|
||||||
|
// c, err := NewFile2(path)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
// err = c.Load()
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
func NewFile(path string) (Capabilities, error) {
|
||||||
|
c, err := newFile(path)
|
||||||
|
if err != nil {
|
||||||
|
return c, err
|
||||||
|
}
|
||||||
|
err = c.Load()
|
||||||
|
return c, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFile2 creates a new initialized Capabilities object for given
|
||||||
|
// file path. This does not load the process's current capabilities;
|
||||||
|
// to do that you must call Load explicitly.
|
||||||
|
func NewFile2(path string) (Capabilities, error) {
|
||||||
|
return newFile(path)
|
||||||
}
|
}
|
||||||
|
16
vendor/github.com/syndtr/gocapability/capability/capability_linux.go
generated
vendored
16
vendor/github.com/syndtr/gocapability/capability/capability_linux.go
generated
vendored
@ -103,21 +103,17 @@ func newPid(pid int) (c Capabilities, err error) {
|
|||||||
case linuxCapVer1:
|
case linuxCapVer1:
|
||||||
p := new(capsV1)
|
p := new(capsV1)
|
||||||
p.hdr.version = capVers
|
p.hdr.version = capVers
|
||||||
p.hdr.pid = pid
|
p.hdr.pid = int32(pid)
|
||||||
c = p
|
c = p
|
||||||
case linuxCapVer2, linuxCapVer3:
|
case linuxCapVer2, linuxCapVer3:
|
||||||
p := new(capsV3)
|
p := new(capsV3)
|
||||||
p.hdr.version = capVers
|
p.hdr.version = capVers
|
||||||
p.hdr.pid = pid
|
p.hdr.pid = int32(pid)
|
||||||
c = p
|
c = p
|
||||||
default:
|
default:
|
||||||
err = errUnknownVers
|
err = errUnknownVers
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = c.Load()
|
|
||||||
if err != nil {
|
|
||||||
c = nil
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,11 +424,11 @@ func (c *capsV3) Load() (err error) {
|
|||||||
}
|
}
|
||||||
if strings.HasPrefix(line, "CapB") {
|
if strings.HasPrefix(line, "CapB") {
|
||||||
fmt.Sscanf(line[4:], "nd: %08x%08x", &c.bounds[1], &c.bounds[0])
|
fmt.Sscanf(line[4:], "nd: %08x%08x", &c.bounds[1], &c.bounds[0])
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(line, "CapA") {
|
if strings.HasPrefix(line, "CapA") {
|
||||||
fmt.Sscanf(line[4:], "mb: %08x%08x", &c.ambient[1], &c.ambient[0])
|
fmt.Sscanf(line[4:], "mb: %08x%08x", &c.ambient[1], &c.ambient[0])
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.Close()
|
f.Close()
|
||||||
@ -492,10 +488,6 @@ func (c *capsV3) Apply(kind CapType) (err error) {
|
|||||||
|
|
||||||
func newFile(path string) (c Capabilities, err error) {
|
func newFile(path string) (c Capabilities, err error) {
|
||||||
c = &capsFile{path: path}
|
c = &capsFile{path: path}
|
||||||
err = c.Load()
|
|
||||||
if err != nil {
|
|
||||||
c = nil
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/github.com/syndtr/gocapability/capability/syscall_linux.go
generated
vendored
2
vendor/github.com/syndtr/gocapability/capability/syscall_linux.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
type capHeader struct {
|
type capHeader struct {
|
||||||
version uint32
|
version uint32
|
||||||
pid int
|
pid int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type capData struct {
|
type capData struct {
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -769,7 +769,7 @@ github.com/stretchr/objx
|
|||||||
github.com/stretchr/testify/assert
|
github.com/stretchr/testify/assert
|
||||||
github.com/stretchr/testify/mock
|
github.com/stretchr/testify/mock
|
||||||
github.com/stretchr/testify/require
|
github.com/stretchr/testify/require
|
||||||
# github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4 => github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4
|
# github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 => github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
|
||||||
github.com/syndtr/gocapability/capability
|
github.com/syndtr/gocapability/capability
|
||||||
# github.com/thecodeteam/goscaleio v0.1.0 => github.com/thecodeteam/goscaleio v0.1.0
|
# github.com/thecodeteam/goscaleio v0.1.0 => github.com/thecodeteam/goscaleio v0.1.0
|
||||||
github.com/thecodeteam/goscaleio
|
github.com/thecodeteam/goscaleio
|
||||||
|
Loading…
Reference in New Issue
Block a user