summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorMichael Halcrow2008-07-24 06:30:07 +0200
committerLinus Torvalds2008-07-24 19:47:31 +0200
commit72b55fffd631a89e5be6fe1b4f2565bc4cd90deb (patch)
treeece810c24655a6eeed96a6f2fbe14dea6478f031 /fs/ecryptfs/ecryptfs_kernel.h
parentecryptfs: inode.c mmap.c use unaligned byteorder helpers (diff)
downloadkernel-qcow2-linux-72b55fffd631a89e5be6fe1b4f2565bc4cd90deb.tar.gz
kernel-qcow2-linux-72b55fffd631a89e5be6fe1b4f2565bc4cd90deb.tar.xz
kernel-qcow2-linux-72b55fffd631a89e5be6fe1b4f2565bc4cd90deb.zip
eCryptfs: do not try to open device files on mknod
When creating device nodes, eCryptfs needs to delay actually opening the lower persistent file until an application tries to open. Device handles may not be backed by anything when they first come into existence. [Valdis.Kletnieks@vt.edu: build fix] Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Cc: <Valdis.Kletnieks@vt.edu} Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index b4a0cccfdd7c..b0727f91454e 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -235,6 +235,7 @@ struct ecryptfs_crypt_stat {
#define ECRYPTFS_METADATA_IN_XATTR 0x00000100
#define ECRYPTFS_VIEW_AS_ENCRYPTED 0x00000200
#define ECRYPTFS_KEY_SET 0x00000400
+#define ECRYPTFS_DELAY_PERSISTENT 0x00000800
u32 flags;
unsigned int file_version;
size_t iv_bytes;
@@ -574,9 +575,11 @@ struct ecryptfs_open_req {
struct list_head kthread_ctl_list;
};
+#define ECRYPTFS_INTERPOSE_FLAG_D_ADD 0x00000001
+#define ECRYPTFS_INTERPOSE_FLAG_DELAY_PERSISTENT_FILE 0x00000002
int ecryptfs_interpose(struct dentry *hidden_dentry,
struct dentry *this_dentry, struct super_block *sb,
- int flag);
+ u32 flags);
int ecryptfs_fill_zeros(struct file *file, loff_t new_length);
int ecryptfs_decode_filename(struct ecryptfs_crypt_stat *crypt_stat,
const char *name, int length,
@@ -709,5 +712,6 @@ void ecryptfs_destroy_kthread(void);
int ecryptfs_privileged_open(struct file **lower_file,
struct dentry *lower_dentry,
struct vfsmount *lower_mnt);
+int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry);
#endif /* #ifndef ECRYPTFS_KERNEL_H */