aboutsummaryrefslogtreecommitdiff
path: root/metadata/config.go
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2017-03-02 10:38:33 -0800
committerJoe Richey joerichey@google.com <joerichey@google.com>2017-05-02 13:39:18 -0700
commita683ab55245aa44ada5059f8e9816adbd94198ff (patch)
tree13b966a777803e1b2a870b89219c3440259e9ffb /metadata/config.go
parent06e86bde8886aca3e1cd8cbc948cff7a103f97ab (diff)
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
Diffstat (limited to 'metadata/config.go')
-rw-r--r--metadata/config.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/metadata/config.go b/metadata/config.go
index 1d73755..47b6cce 100644
--- a/metadata/config.go
+++ b/metadata/config.go
@@ -20,8 +20,10 @@
// Package metadata contains all of the on disk structures.
// These structures are definied in meatadata.proto. The package also
-// contains functions for reading and writing the Config file to disk
-// giving us a config file.
+// contains functions for manipulating these structures, specifically:
+// * Reading and Writing the Config file to disk
+// * Getting and Setting Policies for directories
+// * Reasonable defaults for a Policy's EncryptionOptions
package metadata
//go:generate protoc --go_out=. metadata.proto