Commit cce3c192 authored by Bart Van Assche's avatar Bart Van Assche Committed by Greg Kroah-Hartman

scsi: target/iscsi: Make iscsit_ta_authentication() respect the output buffer size

[ Upstream commit 35bea5c8 ]

Fixes: e48354ce ("iscsi-target: Add iSCSI fabric support for target v4.1")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a93a7552
...@@ -637,8 +637,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication) ...@@ -637,8 +637,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication)
none = strstr(buf1, NONE); none = strstr(buf1, NONE);
if (none) if (none)
goto out; goto out;
strncat(buf1, ",", strlen(",")); strlcat(buf1, "," NONE, sizeof(buf1));
strncat(buf1, NONE, strlen(NONE));
if (iscsi_update_param_value(param, buf1) < 0) if (iscsi_update_param_value(param, buf1) < 0)
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment