Description of problem:
The qla2xxx driver now supports NPIV which adds two new sysfs pseduofiles to the SCSI host attributes:
w--w--w- root root /sys/class/scsi_host/host1/vport_create
w--w--w- root root /sys/class/scsi_host/host1/vport_delete
w--w--w- root root /sys/class/scsi_host/host2/vport_create
w--w--w- root root /sys/class/scsi_host/host2/vport_delete
These file default to world writable (S_IWUGO/0222). Upstream uses S_IWUSR (0644) for these files although they've moved around a bit - the equivalent attributes are created from drivers/scsi/scsi_transport_fc.c now.
Version-Release number of selected component (if applicable):
2.6.18-63.el5 onwards
How reproducible:
100% on systems that loads qla2xxx on NPIV capable hardware.
Steps to Reproduce:
1. ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_*
ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_id
ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_disable
ls -l /sys/class/scsi_host/<a qla2xxx host>/symbolic_port_name
Actual results:
--w--w--w- root root /sys/class/scsi_host/host1/vport_create
--w--w--w- root root /sys/class/scsi_host/host1/vport_delete
--w--w--w- root root /sys/class/scsi_host/host2/vport_create
--w--w--w- root root /sys/class/scsi_host/host2/vport_delete
etc.
Expected results:
-rw-r--r-- root root /sys/class/scsi_host/host1/vport_create
-rw-r--r-- root root /sys/class/scsi_host/host1/vport_delete
-rw-r--r-- root root /sys/class/scsi_host/host2/vport_create
-rw-r--r-- root root /sys/class/scsi_host/host2/vport_delete
etc.
Additional info:
Created attachment 369281[details]
Change sysfs permissions from 0222 to 0644 for a bunch of qla2xxx sysfs files
Smoke tested by me but I have no NPIV-capable hardware here to test properly.