All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/security: Check xattr support in security_init.
Date: Tue, 10 Feb 2009 11:11:57 +0800	[thread overview]
Message-ID: <4990F07D.6020308@oracle.com> (raw)
In-Reply-To: <4990EAD8.6030501@oracle.com>



Tiger Yang wrote:
> Hi, Tao
> 
> I already fixed this issue :)
> http://oss.oracle.com/pipermail/ocfs2-devel/2008-December/003559.html
aha, yes, It looks that my repository is a little older. Let me rebase it.

Sorry for the noise.

Regards,
Tao
> 
> Thanks,
> tiger
> 
> Tao Ma wrote:
>> If the system supports selinux, we will return sucessfully from
>> ocfs2_init_security_get if it is called for the mount point.
>> And in that case if the volume doesn't have xattr support, we
>> will not be able to create a new inode in the mount dir because
>> ocfs2_mknod will try to set security attributes for a new created
>> inode. This patch check xattr support in ocfs2_init_security_get,
>> so it will let ocfs2_mknod knows that we don't support xattr and
>> it don't need to init security for the new inode in that case.
>>
>> Signed-off-by: Tao Ma <tao.ma@oracle.com>
>> ---
>>  fs/ocfs2/xattr.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
>> index 5aec833..8a7db21 100644
>> --- a/fs/ocfs2/xattr.c
>> +++ b/fs/ocfs2/xattr.c
>> @@ -5289,6 +5289,9 @@ int ocfs2_init_security_get(struct inode *inode,
>>                  struct inode *dir,
>>                  struct ocfs2_security_xattr_info *si)
>>  {
>> +    if (!ocfs2_supports_xattr(OCFS2_SB(inode->i_sb)))
>> +        return -EOPNOTSUPP;
>> +
>>      return security_inode_init_security(inode, dir, &si->name, 
>> &si->value,
>>                          &si->value_len);
>>  }

      reply	other threads:[~2009-02-10  3:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 21:56 [Ocfs2-devel] [PATCH] ocfs2/security: Check xattr support in security_init Tao Ma
2009-02-10  2:47 ` Tiger Yang
2009-02-10  3:11   ` Tao Ma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4990F07D.6020308@oracle.com \
    --to=tao.ma@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.