All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: jack@suse.cz
Cc: swhiteho@redhat.com, linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: [PATCH 10/10] quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
Date: Tue, 16 Feb 2010 03:44:56 -0500	[thread overview]
Message-ID: <20100216084652.945507392@bombadil.infradead.org> (raw)
In-Reply-To: 20100216084446.377980079@bombadil.infradead.org

[-- Attachment #1: xfs-quota-drop-permission-checks --]
[-- Type: text/plain, Size: 850 bytes --]

We already do these checks in the generic code.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_quotaops.c	2010-02-16 00:15:27.709004380 +0100
+++ linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c	2010-02-16 00:25:10.992007173 +0100
@@ -68,8 +68,6 @@ xfs_fs_set_xstate(
 		return -EROFS;
 	if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp))
 		return -ENOSYS;
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
 
 	if (uflags & XFS_QUOTA_UDQ_ACCT)
 		flags |= XFS_UQUOTA_ACCT;
@@ -130,8 +128,6 @@ xfs_fs_set_xquota(
 		return -ENOSYS;
 	if (!XFS_IS_QUOTA_ON(mp))
 		return -ESRCH;
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
 
 	return -xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
 }


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: jack@suse.cz
Cc: linux-fsdevel@vger.kernel.org, swhiteho@redhat.com, xfs@oss.sgi.com
Subject: [PATCH 10/10] quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
Date: Tue, 16 Feb 2010 03:44:56 -0500	[thread overview]
Message-ID: <20100216084652.945507392@bombadil.infradead.org> (raw)
In-Reply-To: 20100216084446.377980079@bombadil.infradead.org

[-- Attachment #1: xfs-quota-drop-permission-checks --]
[-- Type: text/plain, Size: 971 bytes --]

We already do these checks in the generic code.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_quotaops.c	2010-02-16 00:15:27.709004380 +0100
+++ linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c	2010-02-16 00:25:10.992007173 +0100
@@ -68,8 +68,6 @@ xfs_fs_set_xstate(
 		return -EROFS;
 	if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp))
 		return -ENOSYS;
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
 
 	if (uflags & XFS_QUOTA_UDQ_ACCT)
 		flags |= XFS_UQUOTA_ACCT;
@@ -130,8 +128,6 @@ xfs_fs_set_xquota(
 		return -ENOSYS;
 	if (!XFS_IS_QUOTA_ON(mp))
 		return -ESRCH;
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
 
 	return -xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
 }

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2010-02-16  8:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16  8:44 [PATCH 00/10] quotactl fixed and cleanups Christoph Hellwig
2010-02-16  8:44 ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 01/10] quota: split do_quotactl Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 02/10] quota: clean up checks for supported quota methods Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 03/10] quota: special case Q_SYNC without device name Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 04/10] quota: simplify permission checking Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 05/10] quota: clean up Q_XQUOTASYNC Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 06/10] quota: move code from sync_quota_sb into vfs_quota_sync Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 07/10] quota: remove invalid optimization from quota_sync_all Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 08/10] quota: split out netlink notification support from quota.c Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` [PATCH 09/10] quota: split out compat_sys_quotactl " Christoph Hellwig
2010-02-16  8:44   ` Christoph Hellwig
2010-02-16  8:44 ` Christoph Hellwig [this message]
2010-02-16  8:44   ` [PATCH 10/10] quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota Christoph Hellwig
2010-02-16  8:48 ` [PATCH 00/10] quotactl fixed and cleanups Christoph Hellwig
2010-02-16  8:48   ` Christoph Hellwig
2010-02-16 10:37 ` Steven Whitehouse
2010-02-16 10:37   ` Steven Whitehouse
2010-02-16 18:36 ` Jan Kara
2010-02-16 18:36   ` Jan Kara
2010-02-16 19:12   ` Christoph Hellwig
2010-02-16 19:12     ` Christoph Hellwig
2010-02-16 21:26     ` Jan Kara
2010-02-16 21:26       ` Jan Kara
2010-02-16 21:54       ` Christoph Hellwig
2010-02-16 21:54         ` Christoph Hellwig
2010-02-17 19:37   ` Christoph Hellwig
2010-02-17 19:37     ` Christoph Hellwig
2010-02-17 23:34     ` Jan Kara
2010-02-17 23:34       ` Jan Kara
2010-02-25 22:04 ` Alex Elder
2010-02-25 22:04   ` Alex Elder

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=20100216084652.945507392@bombadil.infradead.org \
    --to=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=xfs@oss.sgi.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.