|
@@ -531,10 +531,10 @@ func (daemon *Daemon) getEntrypointAndArgs(configEntrypoint, configCmd []string)
|
|
return entrypoint, args
|
|
return entrypoint, args
|
|
}
|
|
}
|
|
|
|
|
|
-func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
|
|
|
|
+func parseSecurityOpt(container *Container, config *runconfig.HostConfig) error {
|
|
var (
|
|
var (
|
|
- label_opts []string
|
|
|
|
- err error
|
|
|
|
|
|
+ labelOpts []string
|
|
|
|
+ err error
|
|
)
|
|
)
|
|
|
|
|
|
for _, opt := range config.SecurityOpt {
|
|
for _, opt := range config.SecurityOpt {
|
|
@@ -544,7 +544,7 @@ func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
}
|
|
}
|
|
switch con[0] {
|
|
switch con[0] {
|
|
case "label":
|
|
case "label":
|
|
- label_opts = append(label_opts, con[1])
|
|
|
|
|
|
+ labelOpts = append(labelOpts, con[1])
|
|
case "apparmor":
|
|
case "apparmor":
|
|
container.AppArmorProfile = con[1]
|
|
container.AppArmorProfile = con[1]
|
|
default:
|
|
default:
|
|
@@ -552,7 +552,7 @@ func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- container.ProcessLabel, container.MountLabel, err = label.InitLabels(label_opts)
|
|
|
|
|
|
+ container.ProcessLabel, container.MountLabel, err = label.InitLabels(labelOpts)
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
@@ -586,7 +586,6 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, img *i
|
|
execCommands: newExecStore(),
|
|
execCommands: newExecStore(),
|
|
}
|
|
}
|
|
container.root = daemon.containerRoot(container.ID)
|
|
container.root = daemon.containerRoot(container.ID)
|
|
- err = parseSecurityOpt(container, config)
|
|
|
|
return container, err
|
|
return container, err
|
|
}
|
|
}
|
|
|
|
|