From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
Date: Fri, 7 Jul 2017 08:58:05 +0800 [thread overview]
Message-ID: <6929112f-e8f2-8fe2-bb13-7a7ebcdbf7db@kernel.org> (raw)
In-Reply-To: <20170707001609.GA8300@jaegeuk-macbookpro.roam.corp.google.com>
On 2017/7/7 8:16, Jaegeuk Kim wrote:
> On 07/07, Chao Yu wrote:
>> On 2017/7/6 10:23, Jaegeuk Kim wrote:
>>> This patch allows atomic/volatile ioctls for sqlite under sdcardfs.
>>
>> Out of curiosity, we will lose some capable when passing through sdcardfs?
>
> I don't think so. But, it seems a test applicaion tries to access database from
> difference uid.
Oh, is that really allowed? if the sqlite database is public in sdcard directory,
application needs to apply WRITE_EXTERNAL_STORAGE in order to add itself to
sdcard_rw group, then it can access the database. Right?
Thanks,
>
> Thanks,
>
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
>>> fs/f2fs/file.c | 15 ---------------
>>> 1 file changed, 15 deletions(-)
>>>
>>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>>> index f5d6357e8360..dd8f5d2caa48 100644
>>> --- a/fs/f2fs/file.c
>>> +++ b/fs/f2fs/file.c
>>> @@ -1587,9 +1587,6 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
>>> struct inode *inode = file_inode(filp);
>>> int ret;
>>>
>>> - if (!inode_owner_or_capable(inode))
>>> - return -EACCES;
>>> -
>>> if (!S_ISREG(inode->i_mode))
>>> return -EINVAL;
>>>
>>> @@ -1636,9 +1633,6 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
>>> struct inode *inode = file_inode(filp);
>>> int ret;
>>>
>>> - if (!inode_owner_or_capable(inode))
>>> - return -EACCES;
>>> -
>>> ret = mnt_want_write_file(filp);
>>> if (ret)
>>> return ret;
>>> @@ -1672,9 +1666,6 @@ static int f2fs_ioc_start_volatile_write(struct file *filp)
>>> struct inode *inode = file_inode(filp);
>>> int ret;
>>>
>>> - if (!inode_owner_or_capable(inode))
>>> - return -EACCES;
>>> -
>>> if (!S_ISREG(inode->i_mode))
>>> return -EINVAL;
>>>
>>> @@ -1707,9 +1698,6 @@ static int f2fs_ioc_release_volatile_write(struct file *filp)
>>> struct inode *inode = file_inode(filp);
>>> int ret;
>>>
>>> - if (!inode_owner_or_capable(inode))
>>> - return -EACCES;
>>> -
>>> ret = mnt_want_write_file(filp);
>>> if (ret)
>>> return ret;
>>> @@ -1736,9 +1724,6 @@ static int f2fs_ioc_abort_volatile_write(struct file *filp)
>>> struct inode *inode = file_inode(filp);
>>> int ret;
>>>
>>> - if (!inode_owner_or_capable(inode))
>>> - return -EACCES;
>>> -
>>> ret = mnt_want_write_file(filp);
>>> if (ret)
>>> return ret;
>>>
next prev parent reply other threads:[~2017-07-07 0:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 2:23 [PATCH] f2fs: relax permission for atomic/volatile ioctls Jaegeuk Kim
2017-07-07 0:04 ` Chao Yu
2017-07-07 0:16 ` Jaegeuk Kim
2017-07-07 0:58 ` Chao Yu [this message]
2017-07-07 1:19 ` 答复: " gaoxiang (P)
2017-07-07 2:12 ` 答复: [f2fs-dev] " Jaegeuk Kim
2017-07-07 2:19 ` 答复: " gaoxiang (P)
2017-07-07 2:08 ` Eric Biggers
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=6929112f-e8f2-8fe2-bb13-7a7ebcdbf7db@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).