From: Darrick J. Wong Date: Thu, 11 Jan 2007 22:15:35 +0000 (-0800) Subject: [SCSI] libsas: sysfs phy control attributes should not be S_IWUGO X-Git-Tag: v2.6.21-rc1~274^2~230^2~71 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fe3b5bfe73ace420709f0cfb198b0ffc704bd38b;p=linux-2.6-omap-h63xx.git [SCSI] libsas: sysfs phy control attributes should not be S_IWUGO Allowing the phy reset controls to be world-triggerable does not seem like a terribly good idea because SAS devices can be disrupted (and ATA devices are really disrupted) by a phy reset. By default only root should be able to do things like that. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index e57b02e8afa..bfbcf5fa72b 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -1446,10 +1446,10 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, i->f->func) #define SETUP_PHY_ATTRIBUTE_WRONLY(field) \ - SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, 1) + SETUP_TEMPLATE(phy_attrs, field, S_IWUSR, 1) #define SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(field, func) \ - SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, i->f->func) + SETUP_TEMPLATE(phy_attrs, field, S_IWUSR, i->f->func) #define SETUP_END_DEV_ATTRIBUTE(field) \ SETUP_TEMPLATE(end_dev_attrs, field, S_IRUGO, 1)