Explorar o código

skip empty networks in plugin install

Signed-off-by: Victor Vieux <vieux@docker.com>
Victor Vieux %!s(int64=8) %!d(string=hai) anos
pai
achega
04e35a01fc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugin/backend_linux.go

+ 1 - 1
plugin/backend_linux.go

@@ -125,7 +125,7 @@ func computePrivileges(pd distribution.PullData) (types.PluginPrivileges, error)
 	}
 
 	var privileges types.PluginPrivileges
-	if c.Network.Type != "null" && c.Network.Type != "bridge" {
+	if c.Network.Type != "null" && c.Network.Type != "bridge" && c.Network.Type != "" {
 		privileges = append(privileges, types.PluginPrivilege{
 			Name:        "network",
 			Description: "permissions to access a network",