mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c5251f7116
Until we can support existing behaviour with `sudo` disable ambient capabilities in runc build. Add tests that non root user cannot use default capabilities, and that capabilities are working as expected. Test for #27590 Update runc. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
25 lines
502 B
Go
25 lines
502 B
Go
// +build linux,gccgo
|
|
|
|
package nsenter
|
|
|
|
/*
|
|
#cgo CFLAGS: -Wall
|
|
extern void nsexec();
|
|
void __attribute__((constructor)) init(void) {
|
|
nsexec();
|
|
}
|
|
*/
|
|
import "C"
|
|
|
|
// AlwaysFalse is here to stay false
|
|
// (and be exported so the compiler doesn't optimize out its reference)
|
|
var AlwaysFalse bool
|
|
|
|
func init() {
|
|
if AlwaysFalse {
|
|
// by referencing this C init() in a noop test, it will ensure the compiler
|
|
// links in the C function.
|
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134
|
|
C.init()
|
|
}
|
|
}
|