Changeset 59130 in vbox for trunk/src/VBox
- Timestamp:
- Dec 15, 2015 11:44:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r58553 r59130 13600 13600 HRESULT hr = S_OK; 13601 13601 13602 if (!mAuthLibCtx.hAuthLibrary) 13603 { 13604 /* Load the external authentication library. */ 13605 Bstr authLibrary; 13606 mVRDEServer->COMGETTER(AuthLibrary)(authLibrary.asOutParam()); 13607 13608 Utf8Str filename = authLibrary; 13609 13610 int rc = AuthLibLoad(&mAuthLibCtx, filename.c_str()); 13611 if (RT_FAILURE(rc)) 13612 { 13613 hr = setError(E_FAIL, 13614 tr("Could not load the external authentication library '%s' (%Rrc)"), 13615 filename.c_str(), rc); 13616 } 13617 } 13618 13619 /* The auth library might need the machine lock. */ 13620 alock.release(); 13621 13622 if (FAILED(hr)) 13623 return hr; 13624 13602 13625 if (aAuthParams[0] == "VRDEAUTH" && aAuthParams.size() == 7) 13603 13626 { … … 13614 13637 AuthResult result = AuthResultAccessDenied; 13615 13638 13616 if (!mAuthLibCtx.hAuthLibrary) 13617 { 13618 /* Load the external authentication library. */ 13619 Bstr authLibrary; 13620 mVRDEServer->COMGETTER(AuthLibrary)(authLibrary.asOutParam()); 13621 13622 Utf8Str filename = authLibrary; 13623 13624 int rc = AuthLibLoad(&mAuthLibCtx, filename.c_str()); 13625 if (RT_FAILURE(rc)) 13626 { 13627 hr = setError(E_FAIL, 13628 tr("Could not load the external authentication library '%s' (%Rrc)"), 13629 filename.c_str(), rc); 13630 } 13631 } 13632 13633 if (SUCCEEDED(hr)) 13634 { 13635 Guid uuid(aAuthParams[parmUuid]); 13636 AuthGuestJudgement guestJudgement = (AuthGuestJudgement)aAuthParams[parmGuestJudgement].toUInt32(); 13637 uint32_t u32ClientId = aAuthParams[parmClientId].toUInt32(); 13638 13639 result = AuthLibAuthenticate(&mAuthLibCtx, 13640 uuid.raw(), guestJudgement, 13641 aAuthParams[parmUser].c_str(), 13642 aAuthParams[parmPassword].c_str(), 13643 aAuthParams[parmDomain].c_str(), 13644 u32ClientId); 13645 } 13639 Guid uuid(aAuthParams[parmUuid]); 13640 AuthGuestJudgement guestJudgement = (AuthGuestJudgement)aAuthParams[parmGuestJudgement].toUInt32(); 13641 uint32_t u32ClientId = aAuthParams[parmClientId].toUInt32(); 13642 13643 result = AuthLibAuthenticate(&mAuthLibCtx, 13644 uuid.raw(), guestJudgement, 13645 aAuthParams[parmUser].c_str(), 13646 aAuthParams[parmPassword].c_str(), 13647 aAuthParams[parmDomain].c_str(), 13648 u32ClientId); 13646 13649 13647 13650 /* Hack: aAuthParams[parmPassword] is const but the code believes in writable memory. */
Note:
See TracChangeset
for help on using the changeset viewer.