containerd/vendor/github.com/godbus/dbus/v5/auth_anonymous.go
Akihiro Suda e1221e69a8 revendor containerd/cgroups
Note: now vndr >= v0.10 is required (https://github.com/containerd/cgroups/issues/139)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-13 16:09:59 +09:00

17 lines
396 B
Go

package dbus
// AuthAnonymous returns an Auth that uses the ANONYMOUS mechanism.
func AuthAnonymous() Auth {
return &authAnonymous{}
}
type authAnonymous struct{}
func (a *authAnonymous) FirstData() (name, resp []byte, status AuthStatus) {
return []byte("ANONYMOUS"), nil, AuthOk
}
func (a *authAnonymous) HandleData(data []byte) (resp []byte, status AuthStatus) {
return nil, AuthError
}