VirtualBox

Ignore:
Timestamp:
Apr 21, 2022 8:38:34 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151023
Message:

doc/manual,Main,Frontends: API changes in preparation for full VM encryption, guarded by VBOX_WITH_FULL_VM_ENCRYPTION (disabled by default) and returning a not supported error for now, bugref:9955

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r93460 r94660  
    419419             "                                     \"TCP/Address\" - interface IP the VRDE\n"
    420420             "                                       server will bind to\n"
    421              "   --settingspw <pw>                 Specify the settings password\n"
     421             "   --settingspw <pw>                 Specify the VirtualBox settings password\n"
    422422             "   --settingspwfile <file>           Specify a file containing the\n"
    423              "                                       settings password\n"
     423             "                                       VirtualBox settings password\n"
     424             "   --password <file>|-               Specify the VM password. Either file containing\n"
     425             "                                     the VM password or \"-\" to read it from console\n"
     426             "   --password-id <id>                Specify the password id for the VM password\n"
    424427             "   -start-paused, --start-paused     Start the VM in paused state\n"
    425428#ifdef VBOX_WITH_RECORDING
     
    827830        OPT_SETTINGSPW_FILE,
    828831        OPT_COMMENT,
    829         OPT_PAUSED
     832        OPT_PAUSED,
     833        OPT_VMPW,
     834        OPT_VMPWID
    830835    };
    831836
     
    846851        { "--settingspw", OPT_SETTINGSPW, RTGETOPT_REQ_STRING },
    847852        { "--settingspwfile", OPT_SETTINGSPW_FILE, RTGETOPT_REQ_STRING },
     853        { "--password", OPT_VMPW, RTGETOPT_REQ_STRING },
     854        { "--password-id", OPT_VMPWID, RTGETOPT_REQ_STRING },
    848855#ifdef VBOX_WITH_RECORDING
    849856        { "-record", 'c', 0 },
     
    866873    const char *pcszSettingsPw = NULL;
    867874    const char *pcszSettingsPwFile = NULL;
     875    const char *pcszVmPassword = NULL;
     876    const char *pcszVmPasswordId = NULL;
    868877    RTGETOPTUNION ValueUnion;
    869878    RTGETOPTSTATE GetState;
     
    898907            case OPT_SETTINGSPW_FILE:
    899908                pcszSettingsPwFile = ValueUnion.psz;
     909                break;
     910            case OPT_VMPW:
     911                pcszVmPassword = ValueUnion.psz;
     912                break;
     913            case OPT_VMPWID:
     914                pcszVmPasswordId = ValueUnion.psz;
    900915                break;
    901916            case OPT_PAUSED:
     
    10571072        }
    10581073
     1074        /* add VM password if required */
     1075        if (pcszVmPassword && pcszVmPasswordId)
     1076        {
     1077            com::Utf8Str strPassword;
     1078            if (!RTStrCmp(pcszVmPassword, "-"))
     1079            {
     1080                /* Get password from console. */
     1081                RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, "Enter the password:");
     1082                if (rcExit == RTEXITCODE_FAILURE)
     1083                    break;
     1084            }
     1085            else
     1086            {
     1087                RTEXITCODE rcExit = readPasswordFile(pcszVmPassword, &strPassword);
     1088                if (rcExit != RTEXITCODE_SUCCESS)
     1089                    break;
     1090            }
     1091            CHECK_ERROR_BREAK(m, AddEncryptionPassword(Bstr(pcszVmPasswordId).raw(),
     1092                                                       Bstr(strPassword).raw()));
     1093        }
    10591094        Bstr bstrVMId;
    10601095        rc = m->COMGETTER(Id)(bstrVMId.asOutParam());
Note: See TracChangeset for help on using the changeset viewer.

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