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/firmware/dell_rbu.c | |
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/firmware/dell_rbu.c')
-rw-r--r-- | drivers/firmware/dell_rbu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index 3a4460265b1..2f452f1f7c8 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c | |||
@@ -522,7 +522,7 @@ static ssize_t read_rbu_mono_data(char *buffer, loff_t pos, size_t count) | |||
522 | rbu_data.image_update_buffer, rbu_data.bios_image_size); | 522 | rbu_data.image_update_buffer, rbu_data.bios_image_size); |
523 | } | 523 | } |
524 | 524 | ||
525 | static ssize_t read_rbu_data(struct kobject *kobj, | 525 | static ssize_t read_rbu_data(struct file *filp, struct kobject *kobj, |
526 | struct bin_attribute *bin_attr, | 526 | struct bin_attribute *bin_attr, |
527 | char *buffer, loff_t pos, size_t count) | 527 | char *buffer, loff_t pos, size_t count) |
528 | { | 528 | { |
@@ -576,7 +576,7 @@ static void callbackfn_rbu(const struct firmware *fw, void *context) | |||
576 | release_firmware(fw); | 576 | release_firmware(fw); |
577 | } | 577 | } |
578 | 578 | ||
579 | static ssize_t read_rbu_image_type(struct kobject *kobj, | 579 | static ssize_t read_rbu_image_type(struct file *filp, struct kobject *kobj, |
580 | struct bin_attribute *bin_attr, | 580 | struct bin_attribute *bin_attr, |
581 | char *buffer, loff_t pos, size_t count) | 581 | char *buffer, loff_t pos, size_t count) |
582 | { | 582 | { |
@@ -586,7 +586,7 @@ static ssize_t read_rbu_image_type(struct kobject *kobj, | |||
586 | return size; | 586 | return size; |
587 | } | 587 | } |
588 | 588 | ||
589 | static ssize_t write_rbu_image_type(struct kobject *kobj, | 589 | static ssize_t write_rbu_image_type(struct file *filp, struct kobject *kobj, |
590 | struct bin_attribute *bin_attr, | 590 | struct bin_attribute *bin_attr, |
591 | char *buffer, loff_t pos, size_t count) | 591 | char *buffer, loff_t pos, size_t count) |
592 | { | 592 | { |
@@ -647,7 +647,7 @@ static ssize_t write_rbu_image_type(struct kobject *kobj, | |||
647 | return rc; | 647 | return rc; |
648 | } | 648 | } |
649 | 649 | ||
650 | static ssize_t read_rbu_packet_size(struct kobject *kobj, | 650 | static ssize_t read_rbu_packet_size(struct file *filp, struct kobject *kobj, |
651 | struct bin_attribute *bin_attr, | 651 | struct bin_attribute *bin_attr, |
652 | char *buffer, loff_t pos, size_t count) | 652 | char *buffer, loff_t pos, size_t count) |
653 | { | 653 | { |
@@ -660,7 +660,7 @@ static ssize_t read_rbu_packet_size(struct kobject *kobj, | |||
660 | return size; | 660 | return size; |
661 | } | 661 | } |
662 | 662 | ||
663 | static ssize_t write_rbu_packet_size(struct kobject *kobj, | 663 | static ssize_t write_rbu_packet_size(struct file *filp, struct kobject *kobj, |
664 | struct bin_attribute *bin_attr, | 664 | struct bin_attribute *bin_attr, |
665 | char *buffer, loff_t pos, size_t count) | 665 | char *buffer, loff_t pos, size_t count) |
666 | { | 666 | { |