From: Eric Seppanen Date: Wed, 20 Nov 2013 22:19:52 +0000 (-0800) Subject: iscsi-target: chap auth shouldn't match username with trailing garbage X-Git-Tag: v3.2.54~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47e67db4779d6fdb0d3a71283265a272d99af2b3;p=pandora-kernel.git iscsi-target: chap auth shouldn't match username with trailing garbage commit 86784c6bdeeef78eed94d298be7a8879f6a97ee2 upstream. In iSCSI negotiations with initiator CHAP enabled, usernames with trailing garbage are permitted, because the string comparison only checks the strlen of the configured username. e.g. "usernameXXXXX" will be permitted to match "username". Just check one more byte so the trailing null char is also matched. Signed-off-by: Eric Seppanen Signed-off-by: Nicholas Bellinger [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed