diff options
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 69f6a2289cdf..fd6dd585514c 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -273,20 +273,36 @@ struct ecryptfs_dentry_info { | |||
273 | struct ecryptfs_crypt_stat *crypt_stat; | 273 | struct ecryptfs_crypt_stat *crypt_stat; |
274 | }; | 274 | }; |
275 | 275 | ||
276 | /** | ||
277 | * ecryptfs_global_auth_tok structs refer to authentication token keys | ||
278 | * in the user keyring that apply to newly created files. A list of | ||
279 | * these objects hangs off of the mount_crypt_stat struct for any | ||
280 | * given eCryptfs mount. This struct maintains a reference to both the | ||
281 | * key contents and the key itself so that the key can be put on | ||
282 | * unmount. | ||
283 | */ | ||
276 | struct ecryptfs_global_auth_tok { | 284 | struct ecryptfs_global_auth_tok { |
277 | #define ECRYPTFS_AUTH_TOK_INVALID 0x00000001 | 285 | #define ECRYPTFS_AUTH_TOK_INVALID 0x00000001 |
278 | u32 flags; | 286 | u32 flags; |
279 | struct list_head mount_crypt_stat_list; | 287 | struct list_head mount_crypt_stat_list; /* Default auth_tok list for |
280 | struct key *global_auth_tok_key; | 288 | * the mount_crypt_stat */ |
281 | struct ecryptfs_auth_tok *global_auth_tok; | 289 | struct key *global_auth_tok_key; /* The key from the user's keyring for |
282 | unsigned char sig[ECRYPTFS_SIG_SIZE_HEX + 1]; | 290 | * the sig */ |
291 | struct ecryptfs_auth_tok *global_auth_tok; /* The key contents */ | ||
292 | unsigned char sig[ECRYPTFS_SIG_SIZE_HEX + 1]; /* The key identifier */ | ||
283 | }; | 293 | }; |
284 | 294 | ||
295 | /** | ||
296 | * Typically, eCryptfs will use the same ciphers repeatedly throughout | ||
297 | * the course of its operations. In order to avoid unnecessarily | ||
298 | * destroying and initializing the same cipher repeatedly, eCryptfs | ||
299 | * keeps a list of crypto API contexts around to use when needed. | ||
300 | */ | ||
285 | struct ecryptfs_key_tfm { | 301 | struct ecryptfs_key_tfm { |
286 | struct crypto_blkcipher *key_tfm; | 302 | struct crypto_blkcipher *key_tfm; |
287 | size_t key_size; | 303 | size_t key_size; |
288 | struct mutex key_tfm_mutex; | 304 | struct mutex key_tfm_mutex; |
289 | struct list_head key_tfm_list; | 305 | struct list_head key_tfm_list; /* The module's tfm list */ |
290 | unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; | 306 | unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; |
291 | }; | 307 | }; |
292 | 308 | ||