]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
metadata: get and set policies from go
authorJoe Richey <joerichey@google.com>
Thu, 2 Mar 2017 18:38:33 +0000 (10:38 -0800)
committerJoe Richey joerichey@google.com <joerichey@google.com>
Tue, 2 May 2017 20:39:18 +0000 (13:39 -0700)
commita683ab55245aa44ada5059f8e9816adbd94198ff
tree13b966a777803e1b2a870b89219c3440259e9ffb
parent06e86bde8886aca3e1cd8cbc948cff7a103f97ab
metadata: get and set policies from go

This commit adds in the ability to get and set policy data from go using
the GetPolicy and SetPolicy functions. This is done via a patch of the
x/sys/unix package that exposes the filesystem encryption structures.

Note that not all the fields of the PolicyData protocol buffer are
needed to get and set policies. The wrapped_policy_keys are not used and
will be written and read by other components of fscrypt.

To run the policy tests, the environment variable BASE_TEST_DIR must be
set to a directory for testing on a filesystem that supports encryption.

Change-Id: I13b1d983356845f3ffc1945cedf53234218f32e5
Makefile
README.md
metadata/config.go
metadata/config_test.go
metadata/metadata.pb.go
metadata/metadata.proto
metadata/policy.go [new file with mode: 0644]
metadata/policy_test.go [new file with mode: 0644]
util/errors.go
util/util.go