diff options
-rw-r--r-- | fs/ecryptfs/Kconfig | 8 | ||||
-rw-r--r-- | fs/ecryptfs/Makefile | 7 | ||||
-rw-r--r-- | fs/ecryptfs/crypto.c | 9 | ||||
-rw-r--r-- | fs/ecryptfs/dentry.c | 2 | ||||
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 40 | ||||
-rw-r--r-- | fs/ecryptfs/file.c | 2 | ||||
-rw-r--r-- | fs/ecryptfs/inode.c | 8 | ||||
-rw-r--r-- | fs/ecryptfs/keystore.c | 9 | ||||
-rw-r--r-- | fs/ecryptfs/messaging.c | 5 | ||||
-rw-r--r-- | include/linux/ecryptfs.h | 12 |
10 files changed, 66 insertions, 36 deletions
diff --git a/fs/ecryptfs/Kconfig b/fs/ecryptfs/Kconfig index e15ef38c24fa..434aa313f077 100644 --- a/fs/ecryptfs/Kconfig +++ b/fs/ecryptfs/Kconfig | |||
@@ -12,3 +12,11 @@ config ECRYPT_FS | |||
12 | 12 | ||
13 | To compile this file system support as a module, choose M here: the | 13 | To compile this file system support as a module, choose M here: the |
14 | module will be called ecryptfs. | 14 | module will be called ecryptfs. |
15 | |||
16 | config ECRYPT_FS_MESSAGING | ||
17 | bool "Enable notifications for userspace key wrap/unwrap" | ||
18 | depends on ECRYPT_FS | ||
19 | help | ||
20 | Enables the /dev/ecryptfs entry for use by ecryptfsd. This allows | ||
21 | for userspace to wrap/unwrap file encryption keys by other | ||
22 | backends, like OpenSSL. | ||
diff --git a/fs/ecryptfs/Makefile b/fs/ecryptfs/Makefile index 2cc9ee4ad2eb..49678a69947d 100644 --- a/fs/ecryptfs/Makefile +++ b/fs/ecryptfs/Makefile | |||
@@ -1,7 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the Linux 2.6 eCryptfs | 2 | # Makefile for the Linux eCryptfs |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_ECRYPT_FS) += ecryptfs.o | 5 | obj-$(CONFIG_ECRYPT_FS) += ecryptfs.o |
6 | 6 | ||
7 | ecryptfs-objs := dentry.o file.o inode.o main.o super.o mmap.o read_write.o crypto.o keystore.o messaging.o miscdev.o kthread.o debug.o | 7 | ecryptfs-y := dentry.o file.o inode.o main.o super.o mmap.o read_write.o \ |
8 | crypto.o keystore.o kthread.o debug.o | ||
9 | |||
10 | ecryptfs-$(CONFIG_ECRYPT_FS_MESSAGING) += messaging.o miscdev.o | ||
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index a7b0c2dfb3db..d5c25db4398f 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -301,17 +301,14 @@ int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg, | |||
301 | while (size > 0 && i < sg_size) { | 301 | while (size > 0 && i < sg_size) { |
302 | pg = virt_to_page(addr); | 302 | pg = virt_to_page(addr); |
303 | offset = offset_in_page(addr); | 303 | offset = offset_in_page(addr); |
304 | if (sg) | 304 | sg_set_page(&sg[i], pg, 0, offset); |
305 | sg_set_page(&sg[i], pg, 0, offset); | ||
306 | remainder_of_page = PAGE_CACHE_SIZE - offset; | 305 | remainder_of_page = PAGE_CACHE_SIZE - offset; |
307 | if (size >= remainder_of_page) { | 306 | if (size >= remainder_of_page) { |
308 | if (sg) | 307 | sg[i].length = remainder_of_page; |
309 | sg[i].length = remainder_of_page; | ||
310 | addr += remainder_of_page; | 308 | addr += remainder_of_page; |
311 | size -= remainder_of_page; | 309 | size -= remainder_of_page; |
312 | } else { | 310 | } else { |
313 | if (sg) | 311 | sg[i].length = size; |
314 | sg[i].length = size; | ||
315 | addr += size; | 312 | addr += size; |
316 | size = 0; | 313 | size = 0; |
317 | } | 314 | } |
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 1b5d9af937df..bf12ba5dd223 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c | |||
@@ -45,14 +45,12 @@ | |||
45 | static int ecryptfs_d_revalidate(struct dentry *dentry, unsigned int flags) | 45 | static int ecryptfs_d_revalidate(struct dentry *dentry, unsigned int flags) |
46 | { | 46 | { |
47 | struct dentry *lower_dentry; | 47 | struct dentry *lower_dentry; |
48 | struct vfsmount *lower_mnt; | ||
49 | int rc = 1; | 48 | int rc = 1; |
50 | 49 | ||
51 | if (flags & LOOKUP_RCU) | 50 | if (flags & LOOKUP_RCU) |
52 | return -ECHILD; | 51 | return -ECHILD; |
53 | 52 | ||
54 | lower_dentry = ecryptfs_dentry_to_lower(dentry); | 53 | lower_dentry = ecryptfs_dentry_to_lower(dentry); |
55 | lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry); | ||
56 | if (!lower_dentry->d_op || !lower_dentry->d_op->d_revalidate) | 54 | if (!lower_dentry->d_op || !lower_dentry->d_op->d_revalidate) |
57 | goto out; | 55 | goto out; |
58 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, flags); | 56 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, flags); |
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 7e2c6f5d7985..dd299b389d4e 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -172,6 +172,19 @@ ecryptfs_get_key_payload_data(struct key *key) | |||
172 | #define ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE 24 | 172 | #define ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE 24 |
173 | #define ECRYPTFS_ENCRYPTED_DENTRY_NAME_LEN (18 + 1 + 4 + 1 + 32) | 173 | #define ECRYPTFS_ENCRYPTED_DENTRY_NAME_LEN (18 + 1 + 4 + 1 + 32) |
174 | 174 | ||
175 | #ifdef CONFIG_ECRYPT_FS_MESSAGING | ||
176 | # define ECRYPTFS_VERSIONING_MASK_MESSAGING (ECRYPTFS_VERSIONING_DEVMISC \ | ||
177 | | ECRYPTFS_VERSIONING_PUBKEY) | ||
178 | #else | ||
179 | # define ECRYPTFS_VERSIONING_MASK_MESSAGING 0 | ||
180 | #endif | ||
181 | |||
182 | #define ECRYPTFS_VERSIONING_MASK (ECRYPTFS_VERSIONING_PASSPHRASE \ | ||
183 | | ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH \ | ||
184 | | ECRYPTFS_VERSIONING_XATTR \ | ||
185 | | ECRYPTFS_VERSIONING_MULTKEY \ | ||
186 | | ECRYPTFS_VERSIONING_MASK_MESSAGING \ | ||
187 | | ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION) | ||
175 | struct ecryptfs_key_sig { | 188 | struct ecryptfs_key_sig { |
176 | struct list_head crypt_stat_list; | 189 | struct list_head crypt_stat_list; |
177 | char keysig[ECRYPTFS_SIG_SIZE_HEX + 1]; | 190 | char keysig[ECRYPTFS_SIG_SIZE_HEX + 1]; |
@@ -399,7 +412,9 @@ struct ecryptfs_daemon { | |||
399 | struct hlist_node euid_chain; | 412 | struct hlist_node euid_chain; |
400 | }; | 413 | }; |
401 | 414 | ||
415 | #ifdef CONFIG_ECRYPT_FS_MESSAGING | ||
402 | extern struct mutex ecryptfs_daemon_hash_mux; | 416 | extern struct mutex ecryptfs_daemon_hash_mux; |
417 | #endif | ||
403 | 418 | ||
404 | static inline size_t | 419 | static inline size_t |
405 | ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat) | 420 | ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat) |
@@ -610,6 +625,7 @@ int | |||
610 | ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, | 625 | ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, |
611 | size_t size, int flags); | 626 | size_t size, int flags); |
612 | int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode); | 627 | int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode); |
628 | #ifdef CONFIG_ECRYPT_FS_MESSAGING | ||
613 | int ecryptfs_process_response(struct ecryptfs_daemon *daemon, | 629 | int ecryptfs_process_response(struct ecryptfs_daemon *daemon, |
614 | struct ecryptfs_message *msg, u32 seq); | 630 | struct ecryptfs_message *msg, u32 seq); |
615 | int ecryptfs_send_message(char *data, int data_len, | 631 | int ecryptfs_send_message(char *data, int data_len, |
@@ -618,6 +634,24 @@ int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx, | |||
618 | struct ecryptfs_message **emsg); | 634 | struct ecryptfs_message **emsg); |
619 | int ecryptfs_init_messaging(void); | 635 | int ecryptfs_init_messaging(void); |
620 | void ecryptfs_release_messaging(void); | 636 | void ecryptfs_release_messaging(void); |
637 | #else | ||
638 | static inline int ecryptfs_init_messaging(void) | ||
639 | { | ||
640 | return 0; | ||
641 | } | ||
642 | static inline void ecryptfs_release_messaging(void) | ||
643 | { } | ||
644 | static inline int ecryptfs_send_message(char *data, int data_len, | ||
645 | struct ecryptfs_msg_ctx **msg_ctx) | ||
646 | { | ||
647 | return -ENOTCONN; | ||
648 | } | ||
649 | static inline int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx, | ||
650 | struct ecryptfs_message **emsg) | ||
651 | { | ||
652 | return -ENOMSG; | ||
653 | } | ||
654 | #endif | ||
621 | 655 | ||
622 | void | 656 | void |
623 | ecryptfs_write_header_metadata(char *virt, | 657 | ecryptfs_write_header_metadata(char *virt, |
@@ -655,12 +689,11 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs, | |||
655 | size_t offset_in_page, size_t size, | 689 | size_t offset_in_page, size_t size, |
656 | struct inode *ecryptfs_inode); | 690 | struct inode *ecryptfs_inode); |
657 | struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index); | 691 | struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index); |
658 | int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon); | ||
659 | int ecryptfs_find_daemon_by_euid(struct ecryptfs_daemon **daemon); | ||
660 | int ecryptfs_parse_packet_length(unsigned char *data, size_t *size, | 692 | int ecryptfs_parse_packet_length(unsigned char *data, size_t *size, |
661 | size_t *length_size); | 693 | size_t *length_size); |
662 | int ecryptfs_write_packet_length(char *dest, size_t size, | 694 | int ecryptfs_write_packet_length(char *dest, size_t size, |
663 | size_t *packet_size_length); | 695 | size_t *packet_size_length); |
696 | #ifdef CONFIG_ECRYPT_FS_MESSAGING | ||
664 | int ecryptfs_init_ecryptfs_miscdev(void); | 697 | int ecryptfs_init_ecryptfs_miscdev(void); |
665 | void ecryptfs_destroy_ecryptfs_miscdev(void); | 698 | void ecryptfs_destroy_ecryptfs_miscdev(void); |
666 | int ecryptfs_send_miscdev(char *data, size_t data_size, | 699 | int ecryptfs_send_miscdev(char *data, size_t data_size, |
@@ -669,6 +702,9 @@ int ecryptfs_send_miscdev(char *data, size_t data_size, | |||
669 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx); | 702 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx); |
670 | int | 703 | int |
671 | ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, struct file *file); | 704 | ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, struct file *file); |
705 | int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon); | ||
706 | int ecryptfs_find_daemon_by_euid(struct ecryptfs_daemon **daemon); | ||
707 | #endif | ||
672 | int ecryptfs_init_kthread(void); | 708 | int ecryptfs_init_kthread(void); |
673 | void ecryptfs_destroy_kthread(void); | 709 | void ecryptfs_destroy_kthread(void); |
674 | int ecryptfs_privileged_open(struct file **lower_file, | 710 | int ecryptfs_privileged_open(struct file **lower_file, |
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 53acc9d0c138..63b1f54b6a1f 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -199,7 +199,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
199 | struct dentry *ecryptfs_dentry = file->f_path.dentry; | 199 | struct dentry *ecryptfs_dentry = file->f_path.dentry; |
200 | /* Private value of ecryptfs_dentry allocated in | 200 | /* Private value of ecryptfs_dentry allocated in |
201 | * ecryptfs_lookup() */ | 201 | * ecryptfs_lookup() */ |
202 | struct dentry *lower_dentry; | ||
203 | struct ecryptfs_file_info *file_info; | 202 | struct ecryptfs_file_info *file_info; |
204 | 203 | ||
205 | mount_crypt_stat = &ecryptfs_superblock_to_private( | 204 | mount_crypt_stat = &ecryptfs_superblock_to_private( |
@@ -222,7 +221,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
222 | rc = -ENOMEM; | 221 | rc = -ENOMEM; |
223 | goto out; | 222 | goto out; |
224 | } | 223 | } |
225 | lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); | ||
226 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; | 224 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; |
227 | mutex_lock(&crypt_stat->cs_mutex); | 225 | mutex_lock(&crypt_stat->cs_mutex); |
228 | if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) { | 226 | if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) { |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index e0f07fb6d56b..5eab400e2590 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -999,8 +999,8 @@ out: | |||
999 | return rc; | 999 | return rc; |
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | int ecryptfs_getattr_link(struct vfsmount *mnt, struct dentry *dentry, | 1002 | static int ecryptfs_getattr_link(struct vfsmount *mnt, struct dentry *dentry, |
1003 | struct kstat *stat) | 1003 | struct kstat *stat) |
1004 | { | 1004 | { |
1005 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 1005 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |
1006 | int rc = 0; | 1006 | int rc = 0; |
@@ -1021,8 +1021,8 @@ int ecryptfs_getattr_link(struct vfsmount *mnt, struct dentry *dentry, | |||
1021 | return rc; | 1021 | return rc; |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | int ecryptfs_getattr(struct vfsmount *mnt, struct dentry *dentry, | 1024 | static int ecryptfs_getattr(struct vfsmount *mnt, struct dentry *dentry, |
1025 | struct kstat *stat) | 1025 | struct kstat *stat) |
1026 | { | 1026 | { |
1027 | struct kstat lower_stat; | 1027 | struct kstat lower_stat; |
1028 | int rc; | 1028 | int rc; |
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 2333203a120b..7d52806c2119 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -1150,7 +1150,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1150 | struct ecryptfs_message *msg = NULL; | 1150 | struct ecryptfs_message *msg = NULL; |
1151 | char *auth_tok_sig; | 1151 | char *auth_tok_sig; |
1152 | char *payload; | 1152 | char *payload; |
1153 | size_t payload_len; | 1153 | size_t payload_len = 0; |
1154 | int rc; | 1154 | int rc; |
1155 | 1155 | ||
1156 | rc = ecryptfs_get_auth_tok_sig(&auth_tok_sig, auth_tok); | 1156 | rc = ecryptfs_get_auth_tok_sig(&auth_tok_sig, auth_tok); |
@@ -1168,7 +1168,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1168 | rc = ecryptfs_send_message(payload, payload_len, &msg_ctx); | 1168 | rc = ecryptfs_send_message(payload, payload_len, &msg_ctx); |
1169 | if (rc) { | 1169 | if (rc) { |
1170 | ecryptfs_printk(KERN_ERR, "Error sending message to " | 1170 | ecryptfs_printk(KERN_ERR, "Error sending message to " |
1171 | "ecryptfsd\n"); | 1171 | "ecryptfsd: %d\n", rc); |
1172 | goto out; | 1172 | goto out; |
1173 | } | 1173 | } |
1174 | rc = ecryptfs_wait_for_response(msg_ctx, &msg); | 1174 | rc = ecryptfs_wait_for_response(msg_ctx, &msg); |
@@ -1202,8 +1202,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1202 | crypt_stat->key_size); | 1202 | crypt_stat->key_size); |
1203 | } | 1203 | } |
1204 | out: | 1204 | out: |
1205 | if (msg) | 1205 | kfree(msg); |
1206 | kfree(msg); | ||
1207 | return rc; | 1206 | return rc; |
1208 | } | 1207 | } |
1209 | 1208 | ||
@@ -1989,7 +1988,7 @@ pki_encrypt_session_key(struct key *auth_tok_key, | |||
1989 | rc = ecryptfs_send_message(payload, payload_len, &msg_ctx); | 1988 | rc = ecryptfs_send_message(payload, payload_len, &msg_ctx); |
1990 | if (rc) { | 1989 | if (rc) { |
1991 | ecryptfs_printk(KERN_ERR, "Error sending message to " | 1990 | ecryptfs_printk(KERN_ERR, "Error sending message to " |
1992 | "ecryptfsd\n"); | 1991 | "ecryptfsd: %d\n", rc); |
1993 | goto out; | 1992 | goto out; |
1994 | } | 1993 | } |
1995 | rc = ecryptfs_wait_for_response(msg_ctx, &msg); | 1994 | rc = ecryptfs_wait_for_response(msg_ctx, &msg); |
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index 8d7a577ae497..49ff8ea08f1c 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c | |||
@@ -97,8 +97,7 @@ static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx) | |||
97 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) | 97 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) |
98 | { | 98 | { |
99 | list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); | 99 | list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); |
100 | if (msg_ctx->msg) | 100 | kfree(msg_ctx->msg); |
101 | kfree(msg_ctx->msg); | ||
102 | msg_ctx->msg = NULL; | 101 | msg_ctx->msg = NULL; |
103 | msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; | 102 | msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; |
104 | } | 103 | } |
@@ -283,7 +282,7 @@ ecryptfs_send_message_locked(char *data, int data_len, u8 msg_type, | |||
283 | int rc; | 282 | int rc; |
284 | 283 | ||
285 | rc = ecryptfs_find_daemon_by_euid(&daemon); | 284 | rc = ecryptfs_find_daemon_by_euid(&daemon); |
286 | if (rc || !daemon) { | 285 | if (rc) { |
287 | rc = -ENOTCONN; | 286 | rc = -ENOTCONN; |
288 | goto out; | 287 | goto out; |
289 | } | 288 | } |
diff --git a/include/linux/ecryptfs.h b/include/linux/ecryptfs.h index 2224a8c0cb64..8d5ab998a222 100644 --- a/include/linux/ecryptfs.h +++ b/include/linux/ecryptfs.h | |||
@@ -6,9 +6,8 @@ | |||
6 | #define ECRYPTFS_VERSION_MINOR 0x04 | 6 | #define ECRYPTFS_VERSION_MINOR 0x04 |
7 | #define ECRYPTFS_SUPPORTED_FILE_VERSION 0x03 | 7 | #define ECRYPTFS_SUPPORTED_FILE_VERSION 0x03 |
8 | /* These flags indicate which features are supported by the kernel | 8 | /* These flags indicate which features are supported by the kernel |
9 | * module; userspace tools such as the mount helper read | 9 | * module; userspace tools such as the mount helper read the feature |
10 | * ECRYPTFS_VERSIONING_MASK from a sysfs handle in order to determine | 10 | * bits from a sysfs handle in order to determine how to behave. */ |
11 | * how to behave. */ | ||
12 | #define ECRYPTFS_VERSIONING_PASSPHRASE 0x00000001 | 11 | #define ECRYPTFS_VERSIONING_PASSPHRASE 0x00000001 |
13 | #define ECRYPTFS_VERSIONING_PUBKEY 0x00000002 | 12 | #define ECRYPTFS_VERSIONING_PUBKEY 0x00000002 |
14 | #define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH 0x00000004 | 13 | #define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH 0x00000004 |
@@ -19,13 +18,6 @@ | |||
19 | #define ECRYPTFS_VERSIONING_HMAC 0x00000080 | 18 | #define ECRYPTFS_VERSIONING_HMAC 0x00000080 |
20 | #define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION 0x00000100 | 19 | #define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION 0x00000100 |
21 | #define ECRYPTFS_VERSIONING_GCM 0x00000200 | 20 | #define ECRYPTFS_VERSIONING_GCM 0x00000200 |
22 | #define ECRYPTFS_VERSIONING_MASK (ECRYPTFS_VERSIONING_PASSPHRASE \ | ||
23 | | ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH \ | ||
24 | | ECRYPTFS_VERSIONING_PUBKEY \ | ||
25 | | ECRYPTFS_VERSIONING_XATTR \ | ||
26 | | ECRYPTFS_VERSIONING_MULTKEY \ | ||
27 | | ECRYPTFS_VERSIONING_DEVMISC \ | ||
28 | | ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION) | ||
29 | #define ECRYPTFS_MAX_PASSWORD_LENGTH 64 | 21 | #define ECRYPTFS_MAX_PASSWORD_LENGTH 64 |
30 | #define ECRYPTFS_MAX_PASSPHRASE_BYTES ECRYPTFS_MAX_PASSWORD_LENGTH | 22 | #define ECRYPTFS_MAX_PASSPHRASE_BYTES ECRYPTFS_MAX_PASSWORD_LENGTH |
31 | #define ECRYPTFS_SALT_SIZE 8 | 23 | #define ECRYPTFS_SALT_SIZE 8 |