* [PATCH] remove LSM file_llseek hook
@ 2002-10-17 14:52 Christoph Hellwig
2002-10-17 15:08 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2002-10-17 14:52 UTC (permalink / raw)
To: torvalds, greg; +Cc: linux-kernel
In the initial discussion LSM folks agreed on this, the
rationale is that lsseek itself makes no sense to
project as mmap() and pread/pwrite() allow access to any
area of the file anyway.
--- 1.19/fs/read_write.c Thu Oct 10 23:36:26 2002
+++ edited/fs/read_write.c Thu Oct 17 16:40:28 2002
@@ -121,12 +121,6 @@
if (!file)
goto bad;
- retval = security_ops->file_llseek(file);
- if (retval) {
- fput(file);
- goto bad;
- }
-
retval = -EINVAL;
if (origin <= 2) {
loff_t res = llseek(file, offset, origin);
@@ -152,10 +146,6 @@
file = fget(fd);
if (!file)
goto bad;
-
- retval = security_ops->file_llseek(file);
- if (retval)
- goto out_putf;
retval = -EINVAL;
if (origin > 2)
--- 1.4/include/linux/security.h Tue Oct 8 11:20:18 2002
+++ edited/include/linux/security.h Thu Oct 17 16:40:44 2002
@@ -376,10 +376,6 @@
* @file_free_security:
* Deallocate and free any security structures stored in file->f_security.
* @file contains the file structure being modified.
- * @file_llseek:
- * Check permission before re-positioning the file offset in @file.
- * @file contains the file structure being modified.
- * Return 0 if permission is granted.
* @file_ioctl:
* @file contains the file structure.
* @cmd contains the operation to perform.
@@ -790,7 +786,6 @@
int (*file_permission) (struct file * file, int mask);
int (*file_alloc_security) (struct file * file);
void (*file_free_security) (struct file * file);
- int (*file_llseek) (struct file * file);
int (*file_ioctl) (struct file * file, unsigned int cmd,
unsigned long arg);
int (*file_mmap) (struct file * file,
--- 1.6/security/capability.c Tue Oct 8 11:01:30 2002
+++ edited/security/capability.c Thu Oct 17 16:41:03 2002
@@ -442,11 +442,6 @@
return;
}
-static int cap_file_llseek (struct file *file)
-{
- return 0;
-}
-
static int cap_file_ioctl (struct file *file, unsigned int command,
unsigned long arg)
{
@@ -787,7 +782,6 @@
.file_permission = cap_file_permission,
.file_alloc_security = cap_file_alloc_security,
.file_free_security = cap_file_free_security,
- .file_llseek = cap_file_llseek,
.file_ioctl = cap_file_ioctl,
.file_mmap = cap_file_mmap,
.file_mprotect = cap_file_mprotect,
--- 1.7/security/dummy.c Tue Oct 8 11:01:30 2002
+++ edited/security/dummy.c Thu Oct 17 16:41:06 2002
@@ -344,11 +344,6 @@
return;
}
-static int dummy_file_llseek (struct file *file)
-{
- return 0;
-}
-
static int dummy_file_ioctl (struct file *file, unsigned int command,
unsigned long arg)
{
@@ -602,7 +597,6 @@
.file_permission = dummy_file_permission,
.file_alloc_security = dummy_file_alloc_security,
.file_free_security = dummy_file_free_security,
- .file_llseek = dummy_file_llseek,
.file_ioctl = dummy_file_ioctl,
.file_mmap = dummy_file_mmap,
.file_mprotect = dummy_file_mprotect,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] remove LSM file_llseek hook
2002-10-17 14:52 [PATCH] remove LSM file_llseek hook Christoph Hellwig
@ 2002-10-17 15:08 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2002-10-17 15:08 UTC (permalink / raw)
To: Christoph Hellwig, torvalds, linux-kernel
On Thu, Oct 17, 2002 at 03:52:07PM +0100, Christoph Hellwig wrote:
> In the initial discussion LSM folks agreed on this, the
> rationale is that lsseek itself makes no sense to
> project as mmap() and pread/pwrite() allow access to any
> area of the file anyway.
Thanks for the patch. As I'm changing all the hooks right now, I'll add
this to my patches that I'm going to send to Linus later today.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-17 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-17 14:52 [PATCH] remove LSM file_llseek hook Christoph Hellwig
2002-10-17 15:08 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox