diff options
author | Chris Wright <chrisw@sous-sol.org> | 2010-05-12 21:28:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:31 -0400 |
commit | 2c3c8bea608866d8bd9dcf92657d57fdcac011c5 (patch) | |
tree | f509b958d0a65c46c831dbdd447a81e706dd995a /drivers/scsi/arcmsr | |
parent | 68d75ed4b84a0806ecd4bc14da4759713b23a532 (diff) |
sysfs: add struct file* to bin_attr callbacks
This allows bin_attr->read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/arcmsr')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_attr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c index 5877f29a6005..a4e04c50c436 100644 --- a/drivers/scsi/arcmsr/arcmsr_attr.c +++ b/drivers/scsi/arcmsr/arcmsr_attr.c | |||
@@ -59,7 +59,8 @@ | |||
59 | 59 | ||
60 | struct device_attribute *arcmsr_host_attrs[]; | 60 | struct device_attribute *arcmsr_host_attrs[]; |
61 | 61 | ||
62 | static ssize_t arcmsr_sysfs_iop_message_read(struct kobject *kobj, | 62 | static ssize_t arcmsr_sysfs_iop_message_read(struct file *filp, |
63 | struct kobject *kobj, | ||
63 | struct bin_attribute *bin, | 64 | struct bin_attribute *bin, |
64 | char *buf, loff_t off, | 65 | char *buf, loff_t off, |
65 | size_t count) | 66 | size_t count) |
@@ -105,7 +106,8 @@ static ssize_t arcmsr_sysfs_iop_message_read(struct kobject *kobj, | |||
105 | return (allxfer_len); | 106 | return (allxfer_len); |
106 | } | 107 | } |
107 | 108 | ||
108 | static ssize_t arcmsr_sysfs_iop_message_write(struct kobject *kobj, | 109 | static ssize_t arcmsr_sysfs_iop_message_write(struct file *filp, |
110 | struct kobject *kobj, | ||
109 | struct bin_attribute *bin, | 111 | struct bin_attribute *bin, |
110 | char *buf, loff_t off, | 112 | char *buf, loff_t off, |
111 | size_t count) | 113 | size_t count) |
@@ -153,7 +155,8 @@ static ssize_t arcmsr_sysfs_iop_message_write(struct kobject *kobj, | |||
153 | } | 155 | } |
154 | } | 156 | } |
155 | 157 | ||
156 | static ssize_t arcmsr_sysfs_iop_message_clear(struct kobject *kobj, | 158 | static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp, |
159 | struct kobject *kobj, | ||
157 | struct bin_attribute *bin, | 160 | struct bin_attribute *bin, |
158 | char *buf, loff_t off, | 161 | char *buf, loff_t off, |
159 | size_t count) | 162 | size_t count) |