Преглед на файлове

skip empty networks in plugin install

Signed-off-by: Victor Vieux <vieux@docker.com>
Victor Vieux преди 8 години
родител
ревизия
04e35a01fc
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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
 	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{
 		privileges = append(privileges, types.PluginPrivilege{
 			Name:        "network",
 			Name:        "network",
 			Description: "permissions to access a network",
 			Description: "permissions to access a network",