Skip to content

Commit ea7a5ed

Browse files
vtlJeff Garzik
authored andcommitted
Avoid world-writable sysfs files in libata driver.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
1 parent f0d0613 commit ea7a5ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/ata/libata-scsi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ ata_scsi_em_message_show(struct device *dev, struct device_attribute *attr,
313313
return ap->ops->em_show(ap, buf);
314314
return -EINVAL;
315315
}
316-
DEVICE_ATTR(em_message, S_IRUGO | S_IWUGO,
316+
DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR,
317317
ata_scsi_em_message_show, ata_scsi_em_message_store);
318318
EXPORT_SYMBOL_GPL(dev_attr_em_message);
319319

@@ -366,7 +366,7 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
366366
}
367367
return -EINVAL;
368368
}
369-
DEVICE_ATTR(sw_activity, S_IWUGO | S_IRUGO, ata_scsi_activity_show,
369+
DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, ata_scsi_activity_show,
370370
ata_scsi_activity_store);
371371
EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
372372

0 commit comments

Comments
 (0)