[patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: linux-fsdevel <linux-fsdevel@...>
Cc: Linux Kernel <linux-kernel@...>
Date: Thursday, October 25, 2007 - 7:06 pm

Remove the need for having CAP_SYS_RAWIO when doing a FIBMAP call on an open file descriptor.

It would be nice to allow users to have permission to see where their data is landing on disk, and there really isn't a good reason to keep them from getting at this information.

Signed-off-by: Mike Waychison <mikew@google.com>
 fs/ioctl.c |    2 --
 1 file changed, 2 deletions(-)

Index: linux-2.6.23/fs/ioctl.c
===================================================================
--- linux-2.6.23.orig/fs/ioctl.c	2007-10-09 13:31:38.000000000 -0700
+++ linux-2.6.23/fs/ioctl.c	2007-10-25 15:48:24.000000000 -0700
@@ -56,8 +56,6 @@ static int file_ioctl(struct file *filp,
 			/* do we support this mess? */
 			if (!mapping->a_ops->bmap)
 				return -EINVAL;
-			if (!capable(CAP_SYS_RAWIO))
-				return -EPERM;
 			if ((error = get_user(block, p)) != 0)
 				return error;
 

--

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Mike Waychison, (Thu Oct 25, 7:06 pm)
Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Mike Waychison, (Thu Oct 25, 8:35 pm)
Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Jason Uhlenkott, (Fri Oct 26, 5:55 pm)
Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Mike Waychison, (Fri Oct 26, 5:59 pm)
Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Jason Uhlenkott, (Fri Oct 26, 6:40 pm)
Re: [patch 1/1] Drop CAP_SYS_RAWIO requirement for FIBMAP, Mike Waychison, (Fri Oct 26, 6:53 pm)