]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes ssh-injection error while using chap authentication
authorJacob M. Jacob <jacob_jacob@dell.com>
Mon, 10 Mar 2014 22:25:41 +0000 (17:25 -0500)
committerJacob M. Jacob <jacob_jacob@dell.com>
Tue, 11 Mar 2014 17:45:33 +0000 (12:45 -0500)
A space in the command construction was being caught by the
ssh-injection check. The fix is to separate the command strings.

Change-Id: If1f719f9c2ceff31ed5386c53cf60bc7f522f4d7
Closes-Bug: #1280409

cinder/tests/test_eqlx.py
cinder/volume/drivers/eqlx.py

index 61f9dc32ba6f9774926f60215e2adb3449080d05..ac815e19197373dd5020ee69bdefbf9cb4ae1390 100644 (file)
@@ -187,7 +187,7 @@ class DellEQLSanISCSIDriverTestCase(test.TestCase):
         self.driver._eql_execute('volume', 'select', volume['name'], 'access',
                                  'create', 'initiator',
                                  self.connector['initiator'],
-                                 'authmethod chap',
+                                 'authmethod', 'chap',
                                  'username',
                                  self.configuration.eqlx_chap_login)
         self.mox.ReplayAll()
index b5e7fa4f2f0aeba8cdac01818bed9c6224592b42..e86c1109248e67a27d026d4b0425ea423fda2973 100644 (file)
@@ -392,7 +392,7 @@ class DellEQLSanISCSIDriver(SanISCSIDriver):
             cmd = ['volume', 'select', volume['name'], 'access', 'create',
                    'initiator', connector['initiator']]
             if self.configuration.eqlx_use_chap:
-                cmd.extend(['authmethod chap', 'username',
+                cmd.extend(['authmethod', 'chap', 'username',
                             self.configuration.eqlx_chap_login])
             self._eql_execute(*cmd)
             iscsi_properties = self._get_iscsi_properties(volume)