Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284467

[PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP

Path csiph.com!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Seth Forshee <seth.forshee@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP
Date Sat, 05 Dec 2015 07:20:02 +0100
Message-ID <qCemm-51v-5@gated-at.bofh.it> (permalink)
X-Original-To Alexander Viro <viro@zeniv.linux.org.uk>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=mtBMhkCrNpY/7SqA3QVZg5xOgGqqJHs7NPflQmkeD2o=; b=uAAk8HSWgTbiRlaW8hTJAv8oVcV1BlEUzWsjknyaMP5Jr5J4QPw7rndUk11SmwvmEM VBVYyNoXlyy1caPFLcRPDHkSMnryRPkDDMIJ2Pu15IeEVHVT4yH6hQHDUha6paNqnjXE Ax/ItCCre2959nQF8zNQmTnHBNxGS1IOM3oBquJpz+eh7NQw1R306lLgbFEtfdxDMr5a SLrGpBRWLwQ0TuCqNIx/moLz3Hoa6W5/6aNqk/s/q3csplTUz/rw4lDxE0jVbrV/X2av eCyBe5XrSfTK/kv5HwEWfJ+ykD7/VZoqvdzPZuQcUf7zWdRM6Fv6kXL61Mn3kSE0WUDz 4SeQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mtBMhkCrNpY/7SqA3QVZg5xOgGqqJHs7NPflQmkeD2o=; b=MRw7z/9JlhW9hSbNGNUClFRoMEs/w/fr4h7F3VbkOh45oBsmrV5X8LPwKa31l2QGVM c+mbsg5FuRCBBuEIkHd8u/5QszLpPv6fVjq5M3c+5GzNcpAGL/xXhOmnqs2QSXT7W5Sr nwejoz9nOgsxWviv0UwWPmEEAVaoM4Q5eMDszUXs10lCEPbjtdX721hlFv32vdvYdp2K 7cgdb7zjxHuIGbK7fR51liW2eEQ4Pv8LrmGnIyD89bsW6ysrcaxDtKE9TkZ+iKj6Fb5K BnqHad/2r+ZGFMArq/hWP1RkSzZvlrZoO3XBDgkMDL4/fcJ3Ck512r2DSN+1YGrKUKoM L0Cw==
X-Gm-Message-State ALoCoQlnTqZoQTpIlurdlFD7IeJMoFx4xz5NjzHSrtFUuqFD1GR+sOKOxZgMqYgDG6afDojCdTl6xlFpVxzZgnkKr0e8sh5PJw==
X-Received by 10.50.43.199 with SMTP id y7mr7917341igl.47.1449296211840; Fri, 04 Dec 2015 22:16:51 -0800 (PST)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 37
Organization linux.* mail to news gateway
X-Original-Cc Seth Forshee <seth.forshee@canonical.com>, "Serge E. Hallyn" <serge@hallyn.com>, Theodore Ts'o <tytso@mit.edu>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Sat, 5 Dec 2015 00:15:16 -0600
X-Original-Message-ID <1449296116-14527-1-git-send-email-seth.forshee@canonical.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1284467

Show key headers only | View raw


The information exposed by FIBMAP is not privileged and is
similar to the information provided by FIEMAP, which does not
require privileges. According to [1] the reason the capability
check was originally added was to prevent crashing the kernel
by passing invalid arguments, but this should no longer be a
problem, so this requirement can be removed.

[1] http://www.gossamer-threads.com/lists/linux/kernel/103611

Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 fs/ioctl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ioctl.c b/fs/ioctl.c
index 5d01d2638ca5..c963d82b0de8 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -55,8 +55,6 @@ static int ioctl_fibmap(struct file *filp, int __user *p)
 	/* do we support this mess? */
 	if (!mapping->a_ops->bmap)
 		return -EINVAL;
-	if (!capable(CAP_SYS_RAWIO))
-		return -EPERM;
 	res = get_user(block, p);
 	if (res)
 		return res;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP Seth Forshee <seth.forshee@canonical.com> - 2015-12-05 07:20 +0100
  Re: [PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2015-12-10 00:00 +0100

csiph-web