Changeset 34574 in vbox
- Timestamp:
- Dec 1, 2010 3:01:02 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68369
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r34244 r34574 293 293 AuthType_T authType; 294 294 uint32_t ulAuthTimeout; 295 com::Utf8Str strAuthLibrary; 295 296 bool fAllowMultiConnection, 296 297 fReuseSingleConnection, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r34529 r34574 309 309 " [--vrdeproperty <name=[value]>]\n" 310 310 " [--vrdeauthtype null|external|guest]\n" 311 " [--vrdeauthlibrary default|<name>\n" 311 312 " [--vrdemulticon on|off]\n" 312 313 " [--vrdereusecon on|off]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r34563 r34574 142 142 MODIFYVM_VRDEPROPERTY, 143 143 MODIFYVM_VRDEAUTHTYPE, 144 MODIFYVM_VRDEAUTHLIBRARY, 144 145 MODIFYVM_VRDEMULTICON, 145 146 MODIFYVM_VRDEREUSECON, … … 265 266 { "--vrdeproperty", MODIFYVM_VRDEPROPERTY, RTGETOPT_REQ_STRING }, 266 267 { "--vrdeauthtype", MODIFYVM_VRDEAUTHTYPE, RTGETOPT_REQ_STRING }, 268 { "--vrdeauthlibrary", MODIFYVM_VRDEAUTHLIBRARY, RTGETOPT_REQ_STRING }, 267 269 { "--vrdemulticon", MODIFYVM_VRDEMULTICON, RTGETOPT_REQ_BOOL_ONOFF }, 268 270 { "--vrdereusecon", MODIFYVM_VRDEREUSECON, RTGETOPT_REQ_BOOL_ONOFF }, … … 1935 1937 } 1936 1938 1939 case MODIFYVM_VRDEAUTHLIBRARY: 1940 { 1941 ComPtr<IVRDEServer> vrdeServer; 1942 machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam()); 1943 ASSERT(vrdeServer); 1944 1945 if (vrdeServer) 1946 { 1947 if (strcmp(ValueUnion.psz, "default") != 0) 1948 { 1949 Bstr bstr(ValueUnion.psz); 1950 CHECK_ERROR(vrdeServer, COMSETTER(AuthLibrary)(bstr.raw())); 1951 } 1952 else 1953 CHECK_ERROR(vrdeServer, COMSETTER(AuthLibrary)(NULL)); 1954 } 1955 break; 1956 } 1957 1937 1958 case MODIFYVM_VRDPMULTICON: 1938 1959 vrdeWarningDeprecatedOption("multicon"); -
trunk/src/VBox/Main/ConsoleVRDPServer.cpp
r34559 r34574 1490 1490 { 1491 1491 /* Load the external authentication library. */ 1492 1493 ComPtr<IMachine> machine;1494 mConsole->COMGETTER(Machine)(machine.asOutParam());1495 1496 ComPtr<IVirtualBox> virtualBox;1497 machine->COMGETTER(Parent)(virtualBox.asOutParam());1498 1499 ComPtr<ISystemProperties> systemProperties;1500 virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());1501 1502 1492 Bstr authLibrary; 1503 systemProperties->COMGETTER(VRDEAuthLibrary)(authLibrary.asOutParam());1493 mConsole->getVRDEServer()->COMGETTER(AuthLibrary)(authLibrary.asOutParam()); 1504 1494 1505 1495 Utf8Str filename = authLibrary; -
trunk/src/VBox/Main/VRDEServerImpl.cpp
r34244 r34574 87 87 mData->mAuthType = AuthType_Null; 88 88 mData->mAuthTimeout = 0; 89 mData->mAuthLibrary.setNull(); 89 90 mData->mEnabled = FALSE; 90 91 mData->mAllowMultiConnection = FALSE; … … 206 207 mData->mAuthType = data.authType; 207 208 mData->mAuthTimeout = data.ulAuthTimeout; 209 mData->mAuthLibrary = data.strAuthLibrary; 208 210 mData->mAllowMultiConnection = data.fAllowMultiConnection; 209 211 mData->mReuseSingleConnection = data.fReuseSingleConnection; … … 232 234 data.fEnabled = !!mData->mEnabled; 233 235 data.authType = mData->mAuthType; 236 data.strAuthLibrary = mData->mAuthLibrary; 234 237 data.ulAuthTimeout = mData->mAuthTimeout; 235 238 data.fAllowMultiConnection = !!mData->mAllowMultiConnection; … … 570 573 mParent->onVRDEServerChange(); 571 574 #endif 575 } 576 577 return S_OK; 578 } 579 580 STDMETHODIMP VRDEServer::COMGETTER(AuthLibrary) (BSTR *aLibrary) 581 { 582 CheckComArgOutPointerValid(aLibrary); 583 584 AutoCaller autoCaller(this); 585 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 586 587 Bstr bstrLibrary; 588 589 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 590 bstrLibrary = mData->mAuthLibrary; 591 alock.release(); 592 593 if (bstrLibrary.isEmpty()) 594 { 595 /* Get the global setting. */ 596 ComPtr<ISystemProperties> systemProperties; 597 HRESULT hrc = mParent->getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam()); 598 599 if (SUCCEEDED(hrc)) 600 hrc = systemProperties->COMGETTER(VRDEAuthLibrary)(bstrLibrary.asOutParam()); 601 602 if (FAILED(hrc)) 603 return setError(hrc, "failed to query the library setting\n"); 604 } 605 606 bstrLibrary.cloneTo(aLibrary); 607 608 return S_OK; 609 } 610 611 STDMETHODIMP VRDEServer::COMSETTER(AuthLibrary) (IN_BSTR aLibrary) 612 { 613 AutoCaller autoCaller(this); 614 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 615 616 /* the machine needs to be mutable */ 617 AutoMutableStateDependency adep(mParent); 618 if (FAILED(adep.rc())) return adep.rc(); 619 620 Bstr bstrLibrary(aLibrary); 621 622 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 623 624 if (mData->mAuthLibrary != bstrLibrary) 625 { 626 mData.backup(); 627 mData->mAuthLibrary = bstrLibrary; 628 629 /* leave the lock before informing callbacks */ 630 alock.release(); 631 632 AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS); 633 mParent->setModified(Machine::IsModified_VRDEServer); 634 mlock.release(); 635 636 mParent->onVRDEServerChange(/* aRestart */ TRUE); 572 637 } 573 638 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r34563 r34574 12631 12631 <interface 12632 12632 name="IVRDEServer" extends="$unknown" 12633 uuid="4 68ab3d3-4808-489e-a301-05d60e959fbc"12633 uuid="444e5d4a-ecd9-4c38-af95-a2fbfd69b486" 12634 12634 wsmap="managed" 12635 12635 > … … 12677 12677 The name of Extension Pack providing VRDE for this VM. Overrides 12678 12678 <link to="ISystemProperties::defaultVRDEExtPack"/>. 12679 </desc> 12680 </attribute> 12681 12682 <attribute name="AuthLibrary" type="wstring"> 12683 <desc> 12684 Library used for authentication of RDP clients by this VM. Overrides 12685 <link to="ISystemProperties::VRDEAuthLibrary"/>. 12679 12686 </desc> 12680 12687 </attribute> -
trunk/src/VBox/Main/include/VRDEServerImpl.h
r34563 r34574 35 35 { 36 36 BOOL mEnabled; 37 Bstr mAuthLibrary; 37 38 AuthType_T mAuthType; 38 39 ULONG mAuthTimeout; … … 85 86 STDMETHOD(COMGETTER(VRDEExtPack))(BSTR *aExtPack); 86 87 STDMETHOD(COMSETTER(VRDEExtPack))(IN_BSTR aExtPack); 88 STDMETHOD(COMGETTER(AuthLibrary)) (BSTR *aValue); 89 STDMETHOD(COMSETTER(AuthLibrary)) (IN_BSTR aValue); 87 90 88 91 // IVRDEServer methods -
trunk/src/VBox/Main/xml/Settings.cpp
r34497 r34574 1386 1386 && (authType == v.authType) 1387 1387 && (ulAuthTimeout == v.ulAuthTimeout) 1388 && (strAuthLibrary == v.strAuthLibrary) 1388 1389 && (fAllowMultiConnection == v.fAllowMultiConnection) 1389 1390 && (fReuseSingleConnection == v.fReuseSingleConnection) … … 2474 2475 } 2475 2476 2477 pelmHwChild->getAttributeValue("authLibrary", hw.vrdeSettings.strAuthLibrary); 2476 2478 pelmHwChild->getAttributeValue("authTimeout", hw.vrdeSettings.ulAuthTimeout); 2477 2479 pelmHwChild->getAttributeValue("allowMultiConnection", hw.vrdeSettings.fAllowMultiConnection); … … 3441 3443 if (m->sv >= SettingsVersion_v1_11) 3442 3444 { 3445 if (hw.vrdeSettings.strAuthLibrary.length()) 3446 pelmVRDE->setAttribute("authLibrary", hw.vrdeSettings.strAuthLibrary); 3443 3447 if (hw.vrdeSettings.strVrdeExtPack.isNotEmpty()) 3444 3448 pelmVRDE->setAttribute("VRDEExtPack", hw.vrdeSettings.strVrdeExtPack); … … 4332 4336 || mediaRegistry.llFloppyImages.size() 4333 4337 || !hardwareMachine.vrdeSettings.strVrdeExtPack.isEmpty() 4338 || !hardwareMachine.vrdeSettings.strAuthLibrary.isEmpty() 4334 4339 || machineUserData.strOsType == "JRockitVE" 4335 4340 )
Note:
See TracChangeset
for help on using the changeset viewer.