VirtualBox

Changeset 21724 in vbox


Ignore:
Timestamp:
Jul 20, 2009 1:03:04 PM (16 years ago)
Author:
vboxsync
Message:

RDP client name, username and domain guest properties are read-only for guest (xTracker #4123)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r21647 r21724  
    496496    char *pszPropertyName;
    497497
    498     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/Name", u32ClientId);
     498    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/Name", u32ClientId);
    499499    if (RT_SUCCESS(rc))
    500500    {
     
    502502        mRemoteDisplayInfo->COMGETTER(ClientName)(clientName.asOutParam());
    503503
    504         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), clientName);
     504        mMachine->SetGuestProperty(Bstr(pszPropertyName), clientName, Bstr("RDONLYGUEST"));
    505505        RTStrFree(pszPropertyName);
    506506    }
    507507
    508     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/User", u32ClientId);
     508    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/User", u32ClientId);
    509509    if (RT_SUCCESS(rc))
    510510    {
    511         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), Bstr(pszUser));
     511        mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(pszUser), Bstr("RDONLYGUEST"));
    512512        RTStrFree(pszPropertyName);
    513513    }
    514514
    515     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/Domain", u32ClientId);
     515    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/Domain", u32ClientId);
    516516    if (RT_SUCCESS(rc))
    517517    {
    518         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), Bstr(pszDomain));
     518        mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(pszDomain), Bstr("RDONLYGUEST"));
    519519        RTStrFree(pszPropertyName);
    520520    }
     
    524524    if (RT_SUCCESS(rc))
    525525    {
    526         mMachine->SetGuestPropertyValue(Bstr("/VirtualBox/HostInfo/VRDP/LastConnectedClient"), Bstr(pszClientId));
     526        mMachine->SetGuestProperty(Bstr("/VirtualBox/HostInfo/VRDP/LastConnectedClient"), Bstr(pszClientId), Bstr("RDONLYGUEST"));
    527527        RTStrFree(pszClientId);
    528528    }
     
    541541    char *pszPropertyName;
    542542
    543     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/Name", u32ClientId);
     543    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/Name", u32ClientId);
    544544    if (RT_SUCCESS(rc))
    545545    {
    546         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), Bstr(""));
     546        mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST"));
    547547        RTStrFree(pszPropertyName);
    548548    }
    549549
    550     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/User", u32ClientId);
     550    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/User", u32ClientId);
    551551    if (RT_SUCCESS(rc))
    552552    {
    553         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), Bstr(""));
     553        mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST"));
    554554        RTStrFree(pszPropertyName);
    555555    }
    556556
    557     rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%d/Domain", u32ClientId);
     557    rc = RTStrAPrintf(&pszPropertyName, "/VirtualBox/HostInfo/VRDP/Client/%u/Domain", u32ClientId);
    558558    if (RT_SUCCESS(rc))
    559559    {
    560         mMachine->SetGuestPropertyValue(Bstr(pszPropertyName), Bstr(""));
     560        mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST"));
    561561        RTStrFree(pszPropertyName);
    562562    }
     
    566566    if (RT_SUCCESS(rc))
    567567    {
    568         mMachine->SetGuestPropertyValue(Bstr("/VirtualBox/HostInfo/VRDP/LastDisconnectedClient"), Bstr(pszClientId));
     568        mMachine->SetGuestProperty(Bstr("/VirtualBox/HostInfo/VRDP/LastDisconnectedClient"), Bstr(pszClientId), Bstr("RDONLYGUEST"));
    569569        RTStrFree(pszClientId);
    570570    }
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