[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <878wld0yiq.wl%vmayatsk@redhat.com>
Date: Mon, 04 May 2009 15:48:45 +0200
From: Vitaly Mayatskikh <v.mayatskih@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Kristen Carlson Accardi <kristen.c.accardi@...el.com>,
Jeff Garzik <jgarzik@...hat.com>
Subject: [PATCH] Avoid world-writable sysfs files in libata driver
Avoid world-writable sysfs files in libata driver.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists