VirtualBox

Ignore:
Timestamp:
Dec 8, 2023 11:06:41 AM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160678
Message:

Main/Unattended: Renamed the attribute "IUnattended::password" to "IUnattended::userPassword". Added new getter/setter attribute "IUnattended::adminPassword", to set a dedicated admin / root password. If not specified explicitly, the password from "IUnattended::userPassword" will be used. Extended testcases. bugref:10554

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp

    r102381 r102534  
    5959{
    6060    mStrUser                            = "vboxuser";
    61     mStrPassword                        = "changeme";
     61    mStrUserPassword                    = "changeme";
     62    mStrAdminPassword                   = "adminpw";
    6263    mStrFullUserName                    = "VBox & VBox;";
    6364    mStrProductKey                      = "911";
     
    168169}
    169170
    170 HRESULT Unattended::getPassword(com::Utf8Str &password)
     171HRESULT Unattended::getUserPassword(com::Utf8Str &password)
    171172{
    172173    RT_NOREF(password);
     
    174175}
    175176
    176 HRESULT Unattended::setPassword(const com::Utf8Str &password)
     177HRESULT Unattended::setUserPassword(const com::Utf8Str &password)
     178{
     179    RT_NOREF(password);
     180    return E_NOTIMPL;
     181}
     182
     183HRESULT Unattended::getAdminPassword(com::Utf8Str &password)
     184{
     185    RT_NOREF(password);
     186    return E_NOTIMPL;
     187}
     188
     189HRESULT Unattended::setAdminPassword(const com::Utf8Str &password)
    177190{
    178191    RT_NOREF(password);
     
    544557}
    545558
    546 Utf8Str const &Unattended::i_getPassword() const
    547 {
    548     return mStrPassword;
     559Utf8Str const &Unattended::i_getUserPassword() const
     560{
     561    return mStrUserPassword;
     562}
     563
     564Utf8Str const &Unattended::i_getAdminPassword() const
     565{
     566    /* If no Administrator / 'root' password is being set, the user password will be used instead.
     567     * Also see API documentation. */
     568    return mStrAdminPassword.isEmpty() ? mStrUserPassword : mStrAdminPassword;
    549569}
    550570
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