From: Azat Khuzhin <a3at.mail@gmail.com>
To: Wuqixuan <wuqixuan@huawei.com>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/sync.c : Add CAP_SYS_ADMIN checking before sync
Date: Thu, 16 Apr 2015 18:08:47 +0300 [thread overview]
Message-ID: <20150416150847.GA16917@azat> (raw)
In-Reply-To: <552FA066.3010905@huawei.com>
On Thu, Apr 16, 2015 at 07:43:34PM +0800, Wuqixuan wrote:
> The process, supposed in one container, can't flush the metadata
> and data of the all host's partitions without CAP_SYS_ADMIN
> capability, like sys_mount is doing. The checking will prevent some
> vicious programs impacting IO sequnces of those partitions,
> particularly, the ones which can't be accessed in the container.
>
> Signed-off-by: Last Wu <wuqixuan@huawei.com>
> ---
> fs/sync.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/sync.c b/fs/sync.c
> index fbc98ee..9f07909 100644
> --- a/fs/sync.c
> +++ b/fs/sync.c
> @@ -103,6 +103,9 @@ SYSCALL_DEFINE0(sync)
> {
> int nowait = 0, wait = 1;
>
> + if (!capable(CAP_SYS_ADMIN))
> + return -EPERM;
So after this patch I can't call sync as a regular user? (even without
containers).
But nothing in sync(2) says about special permissions for this.
next prev parent reply other threads:[~2015-04-16 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 11:43 [PATCH] fs/sync.c : Add CAP_SYS_ADMIN checking before sync Wuqixuan
2015-04-16 15:08 ` Azat Khuzhin [this message]
2015-04-16 19:31 ` Richard Weinberger
2015-04-21 11:30 ` Wuqixuan
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=20150416150847.GA16917@azat \
--to=a3at.mail@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wuqixuan@huawei.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.