aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-08-21 15:53:25 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-02 14:36:59 -0400
commite5b3cd42960a10c1bc3701d4f00767463c88ec9d (patch)
treef8e54261c465f51fe1ebc67facf9074f0744e385 /drivers/scsi/iscsi_tcp.c
parent85b6c720b0931101c8bcc3a5abdc2b8514b0fb4b (diff)
[SCSI] SCSI: sanitize INQUIRY strings
Sanitize the Vendor, Product, and Revision strings contained in an INQUIRY result by setting all non-graphic or non-ASCII characters to ' '. Since the standard disallows such characters, this will affect only non-compliant devices. To help maintain backward compatibility, NUL characters are treated specially. They are taken as string terminators; they and all the following characters are set to ' '. If some valid characters get erased as a result... well, we weren't seeing them before so we haven't lost anything. The primary purpose of this change is to allow blacklist entries to match devices with illegal Vendor or Product strings. In addition, the patch updates a couple of function prototypes, giving inq_result its correct type (unsigned char *). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
0 files changed, 0 insertions, 0 deletions