diff options
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 87f05c4bd509..a3efdccbbcc8 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -162,7 +162,8 @@ out: | |||
162 | enum { ecryptfs_opt_sig, ecryptfs_opt_ecryptfs_sig, ecryptfs_opt_debug, | 162 | enum { ecryptfs_opt_sig, ecryptfs_opt_ecryptfs_sig, ecryptfs_opt_debug, |
163 | ecryptfs_opt_ecryptfs_debug, ecryptfs_opt_cipher, | 163 | ecryptfs_opt_ecryptfs_debug, ecryptfs_opt_cipher, |
164 | ecryptfs_opt_ecryptfs_cipher, ecryptfs_opt_ecryptfs_key_bytes, | 164 | ecryptfs_opt_ecryptfs_cipher, ecryptfs_opt_ecryptfs_key_bytes, |
165 | ecryptfs_opt_passthrough, ecryptfs_opt_err }; | 165 | ecryptfs_opt_passthrough, ecryptfs_opt_xattr_metadata, |
166 | ecryptfs_opt_encrypted_view, ecryptfs_opt_err }; | ||
166 | 167 | ||
167 | static match_table_t tokens = { | 168 | static match_table_t tokens = { |
168 | {ecryptfs_opt_sig, "sig=%s"}, | 169 | {ecryptfs_opt_sig, "sig=%s"}, |
@@ -173,6 +174,8 @@ static match_table_t tokens = { | |||
173 | {ecryptfs_opt_ecryptfs_cipher, "ecryptfs_cipher=%s"}, | 174 | {ecryptfs_opt_ecryptfs_cipher, "ecryptfs_cipher=%s"}, |
174 | {ecryptfs_opt_ecryptfs_key_bytes, "ecryptfs_key_bytes=%u"}, | 175 | {ecryptfs_opt_ecryptfs_key_bytes, "ecryptfs_key_bytes=%u"}, |
175 | {ecryptfs_opt_passthrough, "ecryptfs_passthrough"}, | 176 | {ecryptfs_opt_passthrough, "ecryptfs_passthrough"}, |
177 | {ecryptfs_opt_xattr_metadata, "ecryptfs_xattr_metadata"}, | ||
178 | {ecryptfs_opt_encrypted_view, "ecryptfs_encrypted_view"}, | ||
176 | {ecryptfs_opt_err, NULL} | 179 | {ecryptfs_opt_err, NULL} |
177 | }; | 180 | }; |
178 | 181 | ||
@@ -313,6 +316,16 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options) | |||
313 | mount_crypt_stat->flags |= | 316 | mount_crypt_stat->flags |= |
314 | ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED; | 317 | ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED; |
315 | break; | 318 | break; |
319 | case ecryptfs_opt_xattr_metadata: | ||
320 | mount_crypt_stat->flags |= | ||
321 | ECRYPTFS_XATTR_METADATA_ENABLED; | ||
322 | break; | ||
323 | case ecryptfs_opt_encrypted_view: | ||
324 | mount_crypt_stat->flags |= | ||
325 | ECRYPTFS_XATTR_METADATA_ENABLED; | ||
326 | mount_crypt_stat->flags |= | ||
327 | ECRYPTFS_ENCRYPTED_VIEW_ENABLED; | ||
328 | break; | ||
316 | case ecryptfs_opt_err: | 329 | case ecryptfs_opt_err: |
317 | default: | 330 | default: |
318 | ecryptfs_printk(KERN_WARNING, | 331 | ecryptfs_printk(KERN_WARNING, |
@@ -734,7 +747,8 @@ static struct ecryptfs_version_str_map_elem { | |||
734 | {ECRYPTFS_VERSIONING_PASSPHRASE, "passphrase"}, | 747 | {ECRYPTFS_VERSIONING_PASSPHRASE, "passphrase"}, |
735 | {ECRYPTFS_VERSIONING_PUBKEY, "pubkey"}, | 748 | {ECRYPTFS_VERSIONING_PUBKEY, "pubkey"}, |
736 | {ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH, "plaintext passthrough"}, | 749 | {ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH, "plaintext passthrough"}, |
737 | {ECRYPTFS_VERSIONING_POLICY, "policy"} | 750 | {ECRYPTFS_VERSIONING_POLICY, "policy"}, |
751 | {ECRYPTFS_VERSIONING_XATTR, "metadata in extended attribute"} | ||
738 | }; | 752 | }; |
739 | 753 | ||
740 | static ssize_t version_str_show(struct ecryptfs_obj *obj, char *buff) | 754 | static ssize_t version_str_show(struct ecryptfs_obj *obj, char *buff) |