From: Mark Fasheh Date: Wed, 24 Sep 2008 01:47:14 -0700 Subject: [Ocfs2-devel] [PATCH 2/3] ocfs2: Add security xattr support in ocfs2 In-Reply-To: <48D9EE29.80904@oracle.com> References: <48D3725A.1030701@oracle.com> <1221817353-11111-1-git-send-email-tiger.yang@oracle.com> <20080923062853.GT4563@wotan.suse.de> <48D9EE29.80904@oracle.com> Message-ID: <20080924084714.GX4563@wotan.suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ocfs2-devel@oss.oracle.com On Wed, Sep 24, 2008 at 03:37:13PM +0800, Tiger Yang wrote: > Hi,Mark, > > Mark Fasheh wrote: > > Don't we need to add a call to 'security_inode_init_security()' when > creating a new > >inode? > In security_inode_init_security(), it will check IS_PRIVATE(inode), if > it is not a private inode, it will return. > It seems we don't use S_PRIVATE in ocfs2, do we? Are you sure? This is the code I have in my git tree: int security_inode_init_security(struct inode *inode, struct inode *dir, char **name, void **value, size_t *len) { if (unlikely(IS_PRIVATE(inode))) return -EOPNOTSUPP; return security_ops->inode_init_security(inode, dir, name, value, len); } EXPORT_SYMBOL(security_inode_init_security); So the check is looking for S_PRIVATE and skipping only if it's set, which would mean that this gets run for most inodes... > anyway, I can add this call in ocfs2 quickly. Yeah, I think we need it. Thanks, --Mark -- Mark Fasheh