VirtualBox

Changeset 54809 in vbox


Ignore:
Timestamp:
Mar 17, 2015 12:07:04 PM (10 years ago)
Author:
vboxsync
Message:

Distinguished error codes when a provided password is wrong

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r54738 r54809  
    15411541/** The DEK for disk encryption is missing. */
    15421542#define VERR_VD_DEK_MISSING                         (-3214)
     1543/** The provided password to decrypt the DEK was incorrect. */
     1544#define VERR_VD_PASSWORD_INCORRECT                  (-3215)
    15431545/** Generic: Invalid image file header. Use this for plugins. */
    15441546#define VERR_VD_GEN_INVALID_HEADER                  (-3220)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r54591 r54809  
    423423    <desc>
    424424      Object being in use prohibits operation.
     425    </desc>
     426  </result>
     427
     428  <result name="VBOX_E_PASSWORD_INCORRECT" value="0x80BB000D">
     429    <desc>
     430      A provided password was incorrect.
    425431    </desc>
    426432  </result>
     
    83578363      <desc>
    83588364        Adds a password used for hard disk encryption/decryption.
     8365
     8366        <result name="VBOX_E_PASSWORD_INCORRECT">
     8367          The password provided wasn't correct for at least one disk using the provided
     8368          ID.
     8369        </result>
    83598370      </desc>
    83608371      <param name="id" type="wstring" dir="in">
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r54798 r54809  
    48814881                    {
    48824882                        rc = pIMedium->pfnSetSecKeyIf(pIMedium, mpIfSecKey, mpIfSecKeyHlp);
    4883                         if (RT_FAILURE(rc))
     4883                        if (rc == VERR_VD_PASSWORD_INCORRECT)
     4884                            return setError(VBOX_E_PASSWORD_INCORRECT, tr("The provided password for ID \"%s\" is not correct for at least one disk using this ID"),
     4885                                            strId.c_str());
     4886                        else if (RT_FAILURE(rc))
    48844887                            return setError(E_FAIL, tr("Failed to set the encryption key (%Rrc)"), rc);
    48854888                    }
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