Revert "Update authz plugin list on failure."

This reverts commit fae904af02a184833d2cd5ce9fdd61a4083707c7.

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: a64fc8eea3266968c8e0082dbe6a2f5a8a5bbdc0
Component: engine
This commit is contained in:
Riyaz Faizullabhoy
2016-11-02 14:29:40 -07:00
parent 45ef7232e4
commit abdf1bbec3
3 changed files with 3 additions and 32 deletions

View File

@ -1,20 +1,12 @@
package authorization
import (
"errors"
"sync"
"github.com/docker/docker/pkg/plugingetter"
"github.com/docker/docker/pkg/plugins"
)
var (
// ErrInvalidPlugin indicates that the plugin cannot be used. This is
// because the plugin was not found or does not implement necessary
// functionality
ErrInvalidPlugin = errors.New("invalid plugin")
)
// Plugin allows third party plugins to authorize requests and responses
// in the context of docker API
type Plugin interface {
@ -110,7 +102,7 @@ func (a *authorizationPlugin) initPlugin() error {
plugin, e = plugins.Get(a.name, AuthZApiImplements)
}
if e != nil {
err = ErrInvalidPlugin
err = e
return
}
a.plugin = plugin.Client()