diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-11 17:15:35 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-13 17:20:03 -0500 |
commit | fe3b5bfe73ace420709f0cfb198b0ffc704bd38b (patch) | |
tree | bbdd0cae2c1c47fb26733aa83b8c3539ecb2d0e7 /drivers/scsi/scsi_transport_sas.c | |
parent | 57ba07dc54b7657e69fe8ac42d83df21e415c85b (diff) |
[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 <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index e57b02e8afa5..bfbcf5fa72b9 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, | |||
1446 | SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, i->f->func) | 1446 | SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, i->f->func) |
1447 | 1447 | ||
1448 | #define SETUP_PHY_ATTRIBUTE_WRONLY(field) \ | 1448 | #define SETUP_PHY_ATTRIBUTE_WRONLY(field) \ |
1449 | SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, 1) | 1449 | SETUP_TEMPLATE(phy_attrs, field, S_IWUSR, 1) |
1450 | 1450 | ||
1451 | #define SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(field, func) \ | 1451 | #define SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(field, func) \ |
1452 | SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, i->f->func) | 1452 | SETUP_TEMPLATE(phy_attrs, field, S_IWUSR, i->f->func) |
1453 | 1453 | ||
1454 | #define SETUP_END_DEV_ATTRIBUTE(field) \ | 1454 | #define SETUP_END_DEV_ATTRIBUTE(field) \ |
1455 | SETUP_TEMPLATE(end_dev_attrs, field, S_IRUGO, 1) | 1455 | SETUP_TEMPLATE(end_dev_attrs, field, S_IRUGO, 1) |