mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
@@ -135,9 +135,9 @@ type Config struct {
|
||||
// so that these files prevent any writes.
|
||||
ReadonlyPaths []string `json:"readonly_paths"`
|
||||
|
||||
// SystemProperties is a map of properties and their values. It is the equivalent of using
|
||||
// Sysctl is a map of properties and their values. It is the equivalent of using
|
||||
// sysctl -w my.property.name value in Linux.
|
||||
SystemProperties map[string]string `json:"system_properties"`
|
||||
Sysctl map[string]string `json:"sysctl"`
|
||||
|
||||
// Seccomp allows actions to be taken whenever a syscall is made within the container.
|
||||
// By default, all syscalls are allowed with actions to allow, trap, kill, or return an errno
|
||||
|
||||
@@ -753,7 +753,7 @@ func TestMountCmds(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSystemProperties(t *testing.T) {
|
||||
func TestSysctl(t *testing.T) {
|
||||
if testing.Short() {
|
||||
return
|
||||
}
|
||||
@@ -766,7 +766,7 @@ func TestSystemProperties(t *testing.T) {
|
||||
defer remove(rootfs)
|
||||
|
||||
config := newTemplateConfig(rootfs)
|
||||
config.SystemProperties = map[string]string{
|
||||
config.Sysctl = map[string]string{
|
||||
"kernel.shmmni": "8192",
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ func (l *linuxStandardInit) Init() error {
|
||||
return err
|
||||
}
|
||||
|
||||
for key, value := range l.config.Config.SystemProperties {
|
||||
for key, value := range l.config.Config.Sysctl {
|
||||
if err := writeSystemProperty(key, value); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user