Merge pull request #5869 from vbatts/vbatts-vendor-capabilities
gocapability: upstream fix for unsporrted caps
This commit is contained in:
commit
b2275ee8df
|
@ -45,7 +45,7 @@ clone git github.com/gorilla/context 708054d61e5
|
||||||
|
|
||||||
clone git github.com/gorilla/mux 9b36453141c
|
clone git github.com/gorilla/mux 9b36453141c
|
||||||
|
|
||||||
clone git github.com/syndtr/gocapability 3454319be2
|
clone git github.com/syndtr/gocapability 3c85049eae
|
||||||
|
|
||||||
clone hg code.google.com/p/go.net 84a4013f96e0
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
||||||
|
|
||||||
|
|
|
@ -388,6 +388,11 @@ func (c *capsV3) Apply(kind CapType) (err error) {
|
||||||
}
|
}
|
||||||
err = prctl(syscall.PR_CAPBSET_DROP, uintptr(i), 0, 0, 0)
|
err = prctl(syscall.PR_CAPBSET_DROP, uintptr(i), 0, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// Ignore EINVAL since the capability may not be supported in this system.
|
||||||
|
if errno, ok := err.(syscall.Errno); ok && errno == syscall.EINVAL {
|
||||||
|
err = nil
|
||||||
|
continue
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue