aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 989e034f02bd..cfb4b9fed520 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -385,8 +385,6 @@ struct ecryptfs_msg_ctx {
385 struct mutex mux; 385 struct mutex mux;
386}; 386};
387 387
388struct ecryptfs_daemon;
389
390struct ecryptfs_daemon { 388struct ecryptfs_daemon {
391#define ECRYPTFS_DAEMON_IN_READ 0x00000001 389#define ECRYPTFS_DAEMON_IN_READ 0x00000001
392#define ECRYPTFS_DAEMON_IN_POLL 0x00000002 390#define ECRYPTFS_DAEMON_IN_POLL 0x00000002
@@ -394,10 +392,7 @@ struct ecryptfs_daemon {
394#define ECRYPTFS_DAEMON_MISCDEV_OPEN 0x00000008 392#define ECRYPTFS_DAEMON_MISCDEV_OPEN 0x00000008
395 u32 flags; 393 u32 flags;
396 u32 num_queued_msg_ctx; 394 u32 num_queued_msg_ctx;
397 struct pid *pid; 395 struct file *file;
398 uid_t euid;
399 struct user_namespace *user_ns;
400 struct task_struct *task;
401 struct mutex mux; 396 struct mutex mux;
402 struct list_head msg_ctx_out_queue; 397 struct list_head msg_ctx_out_queue;
403 wait_queue_head_t wait; 398 wait_queue_head_t wait;
@@ -554,6 +549,8 @@ extern struct kmem_cache *ecryptfs_key_tfm_cache;
554struct inode *ecryptfs_get_inode(struct inode *lower_inode, 549struct inode *ecryptfs_get_inode(struct inode *lower_inode,
555 struct super_block *sb); 550 struct super_block *sb);
556void ecryptfs_i_size_init(const char *page_virt, struct inode *inode); 551void ecryptfs_i_size_init(const char *page_virt, struct inode *inode);
552int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
553 struct inode *ecryptfs_inode);
557int ecryptfs_decode_and_decrypt_filename(char **decrypted_name, 554int ecryptfs_decode_and_decrypt_filename(char **decrypted_name,
558 size_t *decrypted_name_size, 555 size_t *decrypted_name_size,
559 struct dentry *ecryptfs_dentry, 556 struct dentry *ecryptfs_dentry,
@@ -607,13 +604,8 @@ int
607ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, 604ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value,
608 size_t size, int flags); 605 size_t size, int flags);
609int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode); 606int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode);
610int ecryptfs_process_helo(uid_t euid, struct user_namespace *user_ns, 607int ecryptfs_process_response(struct ecryptfs_daemon *daemon,
611 struct pid *pid); 608 struct ecryptfs_message *msg, u32 seq);
612int ecryptfs_process_quit(uid_t euid, struct user_namespace *user_ns,
613 struct pid *pid);
614int ecryptfs_process_response(struct ecryptfs_message *msg, uid_t euid,
615 struct user_namespace *user_ns, struct pid *pid,
616 u32 seq);
617int ecryptfs_send_message(char *data, int data_len, 609int ecryptfs_send_message(char *data, int data_len,
618 struct ecryptfs_msg_ctx **msg_ctx); 610 struct ecryptfs_msg_ctx **msg_ctx);
619int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx, 611int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx,
@@ -658,8 +650,7 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
658 struct inode *ecryptfs_inode); 650 struct inode *ecryptfs_inode);
659struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index); 651struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index);
660int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon); 652int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon);
661int ecryptfs_find_daemon_by_euid(struct ecryptfs_daemon **daemon, uid_t euid, 653int ecryptfs_find_daemon_by_euid(struct ecryptfs_daemon **daemon);
662 struct user_namespace *user_ns);
663int ecryptfs_parse_packet_length(unsigned char *data, size_t *size, 654int ecryptfs_parse_packet_length(unsigned char *data, size_t *size,
664 size_t *length_size); 655 size_t *length_size);
665int ecryptfs_write_packet_length(char *dest, size_t size, 656int ecryptfs_write_packet_length(char *dest, size_t size,
@@ -671,8 +662,7 @@ int ecryptfs_send_miscdev(char *data, size_t data_size,
671 u16 msg_flags, struct ecryptfs_daemon *daemon); 662 u16 msg_flags, struct ecryptfs_daemon *daemon);
672void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx); 663void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx);
673int 664int
674ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, uid_t euid, 665ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, struct file *file);
675 struct user_namespace *user_ns, struct pid *pid);
676int ecryptfs_init_kthread(void); 666int ecryptfs_init_kthread(void);
677void ecryptfs_destroy_kthread(void); 667void ecryptfs_destroy_kthread(void);
678int ecryptfs_privileged_open(struct file **lower_file, 668int ecryptfs_privileged_open(struct file **lower_file,