@@ -110,7 +110,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
110110 RegistryConfig : getServiceConfig (runtime ),
111111 RuncCommit : dockerSystem.Commit {},
112112 Runtimes : getRuntimes (configInfo ),
113- SecurityOptions : getSecOpts (sysInfo ),
113+ SecurityOptions : getSecOpts (sysInfo , configInfo ),
114114 ServerVersion : versionInfo .Version ,
115115 SwapLimit : sysInfo .SwapLimit ,
116116 Swarm : swarm.Info {
@@ -169,14 +169,17 @@ func getGraphStatus(storeInfo map[string]string) [][2]string {
169169 return graphStatus
170170}
171171
172- func getSecOpts (sysInfo * sysinfo.SysInfo ) []string {
172+ func getSecOpts (sysInfo * sysinfo.SysInfo , c * config. Config ) []string {
173173 var secOpts []string
174174 if sysInfo .AppArmor {
175175 secOpts = append (secOpts , "name=apparmor" )
176176 }
177177 if sysInfo .Seccomp {
178- // FIXME: get profile name...
179- secOpts = append (secOpts , fmt .Sprintf ("name=seccomp,profile=%s" , "default" ))
178+ profile := "default"
179+ if c .Containers .SeccompProfile != "" && c .Containers .SeccompProfile != config .SeccompDefaultPath {
180+ profile = c .Containers .SeccompProfile
181+ }
182+ secOpts = append (secOpts , fmt .Sprintf ("name=seccomp,profile=%s" , profile ))
180183 }
181184 if rootless .IsRootless () {
182185 secOpts = append (secOpts , "name=rootless" )
0 commit comments