aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/cache.go6
-rw-r--r--security/keyring.go2
-rw-r--r--security/policy.go24
-rw-r--r--security/privileges.go2
4 files changed, 32 insertions, 2 deletions
diff --git a/security/cache.go b/security/cache.go
index d0c60b1..2713ddd 100644
--- a/security/cache.go
+++ b/security/cache.go
@@ -1,3 +1,5 @@
+// +build linux
+
/*
* cache.go - Handles cache clearing and management.
*
@@ -30,7 +32,7 @@ import (
// dentries. This has the effect of making encrypted directories whose keys are
// not present no longer accessible. Requires root privileges.
func DropFilesystemCache() error {
- // Dirty reclaimible inodes must be synced so that they will be freed.
+ // Dirty reclaimable inodes must be synced so that they will be freed.
log.Print("syncing changes to filesystem")
unix.Sync()
@@ -43,7 +45,7 @@ func DropFilesystemCache() error {
defer file.Close()
// "2" just frees the reclaimable inodes and dentries, the associated
// pages to these inodes will be freed. We do not need to free the
- // entire pagecache (as this will severly impact performance).
+ // entire pagecache (as this will servery impact performance).
_, err = file.WriteString("2")
return err
}
diff --git a/security/keyring.go b/security/keyring.go
index 7ce163e..492e0f4 100644
--- a/security/keyring.go
+++ b/security/keyring.go
@@ -1,3 +1,5 @@
+// +build linux
+
/*
* privileges.go - Handles inserting/removing into user keyrings.
*
diff --git a/security/policy.go b/security/policy.go
new file mode 100644
index 0000000..77707ca
--- /dev/null
+++ b/security/policy.go
@@ -0,0 +1,24 @@
+// +build linux
+
+/*
+ * policy.go - Handles kernel encryption policies.
+ *
+ * Copyright 2017 Google Inc.
+ * Author: Joe Richey (joerichey@google.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+type Policy struct {
+
+} \ No newline at end of file
diff --git a/security/privileges.go b/security/privileges.go
index 7d69da9..24f4daf 100644
--- a/security/privileges.go
+++ b/security/privileges.go
@@ -1,3 +1,5 @@
+// +build linux
+
/*
* privileges.go - Functions for managing users and privileges.
*