aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorJoe Richey joerichey@google.com <joerichey@google.com>2018-08-30 03:54:08 -0700
committerJoe Richey joerichey@google.com <joerichey@google.com>2018-08-30 03:54:08 -0700
commit36b185e408a56d93678f52a59e1d68ece8bf0508 (patch)
treeaad5ce6733353fe4350a1ae1a312f10b06456dd8 /actions
parentffbe898d1d42b1cc36def74e86145138fa06c1c3 (diff)
Use proto.Equal instead of reflect.DeepEquals
Diffstat (limited to 'actions')
-rw-r--r--actions/policy.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/actions/policy.go b/actions/policy.go
index cbdcb3a..39c235d 100644
--- a/actions/policy.go
+++ b/actions/policy.go
@@ -22,8 +22,8 @@ package actions
import (
"fmt"
"log"
- "reflect"
+ "github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"github.com/google/fscrypt/crypto"
@@ -153,7 +153,7 @@ func GetPolicyFromPath(ctx *Context, path string) (*Policy, error) {
}
log.Printf("found data for policy %s on %q", descriptor, ctx.Mount.Path)
- if !reflect.DeepEqual(pathData.Options, mountData.Options) {
+ if !proto.Equal(pathData.Options, mountData.Options) {
log.Printf("options from path: %+v", pathData.Options)
log.Printf("options from mount: %+v", mountData.Options)
return nil, errors.Wrapf(ErrPolicyMetadataMismatch, "policy %s", descriptor)