summaryrefslogtreecommitdiff
path: root/internal/configfile/feature_flags.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-06 23:13:10 +0200
committerJakob Unterwurzacher2016-06-06 23:13:10 +0200
commit0f4d3501369e13c8ba6ee4c9fc7df02a3cc698b1 (patch)
treee0009f099fcf9783b5bc6544d7a4ce6a289f14a5 /internal/configfile/feature_flags.go
parentcc5d5a3fcdabca0ecd86646091c545509351dbbe (diff)
configfile: warn about missing feature flags
The plan is to drop support for the oldest filesystem versions in gocryptfs v1.0. For now, we only warn the user.
Diffstat (limited to 'internal/configfile/feature_flags.go')
-rw-r--r--internal/configfile/feature_flags.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/configfile/feature_flags.go b/internal/configfile/feature_flags.go
index d439363..bac8ce8 100644
--- a/internal/configfile/feature_flags.go
+++ b/internal/configfile/feature_flags.go
@@ -19,6 +19,19 @@ var knownFlags map[flagIota]string = map[flagIota]string{
FlagLongNames: "LongNames",
}
+// Filesystems that do not have these feature flags set are deprecated.
+var requiredFlagsNormal []flagIota = []flagIota{
+ FlagDirIV,
+ FlagEMENames,
+ FlagGCMIV128,
+}
+
+// Filesystems without filename encryption obviously don't have or need the
+// related feature flags.
+var requiredFlagsPlaintextNames []flagIota = []flagIota{
+ FlagGCMIV128,
+}
+
// isFeatureFlagKnown verifies that we understand a feature flag
func (cf *ConfFile) isFeatureFlagKnown(flag string) bool {
for _, knownFlag := range knownFlags {