From 10f47e6a1b8b276323b652053945c87a63a5812d Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Fri, 9 Sep 2005 13:01:39 -0700 Subject: [PATCH] ext2: Enable atomic inode security labeling This patch modifies ext2 to call the inode_init_security LSM hook to obtain the security attribute for a newly created inode and to set the resulting attribute on the new inode. This parallels the existing processing for setting ACLs on newly created inodes. Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext2/xattr.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fs/ext2/xattr.h') diff --git a/fs/ext2/xattr.h b/fs/ext2/xattr.h index 5f3bfde3b81..67cfeb66e89 100644 --- a/fs/ext2/xattr.h +++ b/fs/ext2/xattr.h @@ -116,3 +116,11 @@ exit_ext2_xattr(void) # endif /* CONFIG_EXT2_FS_XATTR */ +#ifdef CONFIG_EXT2_FS_SECURITY +extern int ext2_init_security(struct inode *inode, struct inode *dir); +#else +static inline int ext2_init_security(struct inode *inode, struct inode *dir) +{ + return 0; +} +#endif -- cgit v1.2.3-70-g09d2