reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Linux Containers <containers@lists.osdl.org>,
	lkml <linux-kernel@vger.kernel.org>,
	reiserfs-devel@vger.kernel.org
Subject: Re: [RFC] [PATCH -mm] reiser4: replace uid==0 check with capability
Date: Thu, 13 Dec 2007 02:36:27 +0300	[thread overview]
Message-ID: <4760707B.2040007@gmail.com> (raw)
In-Reply-To: <20071212210107.GB24708@sergelap.austin.ibm.com>

Serge E. Hallyn wrote:

>>From c257cb67ce00c8769730cfa92379a53009d99b28 Mon Sep 17 00:00:00 2001
>From: serue@us.ibm.com <serue@us.ibm.com>
>Date: Wed, 5 Dec 2007 14:02:45 -0800
>Subject: [RFC] [PATCH -mm] reiser4: replace uid==0 check with capability
>
>Reiser4 gives root some reserved blocks.  Replace the uid==0 check, which
>is not safe in the face of user namespaces, with a CAP_SYS_RESOURCE check,
>which seems appropriate.
>
>  
>

Agreed. Thanks,
Edward.

>The per-uid and per-guid reservations appear unimplemented so I'm ignoring
>them.
>
>Signed-off-by: Serge Hallyn <serue@us.ibm.com>
>---
> fs/reiser4/super.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/fs/reiser4/super.c b/fs/reiser4/super.c
>index bc4113e..50e3d09 100644
>--- a/fs/reiser4/super.c
>+++ b/fs/reiser4/super.c
>@@ -144,7 +144,7 @@ long reiser4_reserved_blocks(const struct super_block *super	/* super block
> 		reserved += reserved_for_gid(super, gid);
> 	if (REISER4_SUPPORT_UID_SPACE_RESERVATION)
> 		reserved += reserved_for_uid(super, uid);
>-	if (REISER4_SUPPORT_ROOT_SPACE_RESERVATION && (uid == 0))
>+	if (REISER4_SUPPORT_ROOT_SPACE_RESERVATION && capable(CAP_SYS_RESOURCE))
> 		reserved += reserved_for_root(super);
> 	return reserved;
> }
>  
>


      reply	other threads:[~2007-12-12 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 21:01 [RFC] [PATCH -mm] reiser4: replace uid==0 check with capability Serge E. Hallyn
2007-12-12 23:36 ` Edward Shishkin [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=4760707B.2040007@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=serue@us.ibm.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 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).