VirtualBox

Changeset 42192 in vbox for trunk/src


Ignore:
Timestamp:
Jul 17, 2012 2:10:17 PM (12 years ago)
Author:
vboxsync
Message:

iSCSI: bug out early if we get only an encrypted initiator secret

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/ISCSI.cpp

    r42125 r42192  
    38743874        rc = vdIfError(pImage->pIfError, rc, RT_SRC_POS, N_("iSCSI: configuration error: failed to read InitiatorSecret as byte string"));
    38753875        goto out;
     3876    }
     3877    void *pvInitiatorSecretEncrypted;
     3878    size_t cbInitiatorSecretEncrypted;
     3879    rc = VDCFGQueryBytesAlloc(pImage->pIfConfig,
     3880                              "InitiatorSecretEncrypted",
     3881                              &pvInitiatorSecretEncrypted,
     3882                              &cbInitiatorSecretEncrypted);
     3883    if (RT_SUCCESS(rc))
     3884    {
     3885        RTMemFree(pvInitiatorSecretEncrypted);
     3886        if (!pImage->pbInitiatorSecret)
     3887        {
     3888            /* we have an encrypted initiator secret but not an unencrypted one */
     3889            rc = vdIfError(pImage->pIfError, VERR_VD_ISCSI_SECRET_ENCRYPTED, RT_SRC_POS, N_("iSCSI: initiator secret not decrypted"));
     3890            goto out;
     3891        }
    38763892    }
    38773893    pImage->pszTargetUsername = NULL;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette