* [PATCH] Avoid world-writable sysfs files in libata driver
@ 2009-05-04 13:48 Vitaly Mayatskikh
2009-05-11 18:34 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Mayatskikh @ 2009-05-04 13:48 UTC (permalink / raw)
To: linux-kernel; +Cc: Kristen Carlson Accardi, Jeff Garzik
Avoid world-writable sysfs files in libata driver.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
---
drivers/ata/libata-scsi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 2733b0c..68d9132 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -313,7 +313,7 @@ ata_scsi_em_message_show(struct device *dev, struct device_attribute *attr,
return ap->ops->em_show(ap, buf);
return -EINVAL;
}
-DEVICE_ATTR(em_message, S_IRUGO | S_IWUGO,
+DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR,
ata_scsi_em_message_show, ata_scsi_em_message_store);
EXPORT_SYMBOL_GPL(dev_attr_em_message);
@@ -366,7 +366,7 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
}
return -EINVAL;
}
-DEVICE_ATTR(sw_activity, S_IWUGO | S_IRUGO, ata_scsi_activity_show,
+DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, ata_scsi_activity_show,
ata_scsi_activity_store);
EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
--
1.6.2.2
--
wbr, Vitaly
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid world-writable sysfs files in libata driver
2009-05-04 13:48 [PATCH] Avoid world-writable sysfs files in libata driver Vitaly Mayatskikh
@ 2009-05-11 18:34 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-05-11 18:34 UTC (permalink / raw)
To: Vitaly Mayatskikh; +Cc: linux-kernel, Kristen Carlson Accardi, Jeff Garzik
Vitaly Mayatskikh wrote:
> Avoid world-writable sysfs files in libata driver.
>
> Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
> ---
> drivers/ata/libata-scsi.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index 2733b0c..68d9132 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -313,7 +313,7 @@ ata_scsi_em_message_show(struct device *dev, struct device_attribute *attr,
> return ap->ops->em_show(ap, buf);
> return -EINVAL;
> }
> -DEVICE_ATTR(em_message, S_IRUGO | S_IWUGO,
> +DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR,
> ata_scsi_em_message_show, ata_scsi_em_message_store);
> EXPORT_SYMBOL_GPL(dev_attr_em_message);
>
> @@ -366,7 +366,7 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
> }
> return -EINVAL;
> }
> -DEVICE_ATTR(sw_activity, S_IWUGO | S_IRUGO, ata_scsi_activity_show,
> +DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, ata_scsi_activity_show,
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-11 18:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 13:48 [PATCH] Avoid world-writable sysfs files in libata driver Vitaly Mayatskikh
2009-05-11 18:34 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox