From 557db1ea688f0f5a0ac0722070f3bc414b856a51 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 2 Sep 2016 15:20:54 +0200 Subject: [PATCH] daemon: add a flag to override the default seccomp profile Signed-off-by: Antonio Murdaca --- command/system/info.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/command/system/info.go b/command/system/info.go index 0bfd9986d2..dfbc83d90a 100644 --- a/command/system/info.go +++ b/command/system/info.go @@ -140,9 +140,20 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error { } if info.OSType == "linux" { - fmt.Fprintf(dockerCli.Out(), "Security Options:") - ioutils.FprintfIfNotEmpty(dockerCli.Out(), " %s", strings.Join(info.SecurityOptions, " ")) - fmt.Fprintf(dockerCli.Out(), "\n") + if len(info.SecurityOptions) != 0 { + fmt.Fprintf(dockerCli.Out(), "Security Options:\n") + for _, o := range info.SecurityOptions { + switch o.Key { + case "Name": + fmt.Fprintf(dockerCli.Out(), " %s\n", o.Value) + case "Profile": + if o.Key != "default" { + fmt.Fprintf(dockerCli.Err(), " WARNING: You're not using the Docker's default seccomp profile\n") + } + fmt.Fprintf(dockerCli.Out(), " %s: %s\n", o.Key, o.Value) + } + } + } } // Isolation only has meaning on a Windows daemon.