Changeset 67814 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jul 6, 2017 8:37:31 AM (7 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxCredProv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvCredential.cpp
r67809 r67814 385 385 386 386 return S_OK; 387 } 388 389 390 /** 391 * Returns the current value of a specific credential provider field. 392 * 393 * @return Pointer (const) to the credential provider field requested, or NULL if not found / invalid. 394 * @param dwFieldID Field ID of the credential provider field to get. 395 */ 396 PCRTUTF16 VBoxCredProvCredential::getField(DWORD dwFieldID) 397 { 398 if (dwFieldID >= VBOXCREDPROV_NUM_FIELDS) 399 return NULL; 400 401 /* Paranoia: Don't ever reveal passwords. */ 402 if (dwFieldID == VBOXCREDPROV_FIELDID_PASSWORD) 403 return NULL; 404 405 return m_apwszFields[dwFieldID]; 387 406 } 388 407 -
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvCredential.h
r67809 r67814 87 87 /** @} */ 88 88 89 PCRTUTF16 getField(DWORD dwFieldID); 89 90 HRESULT setField(DWORD dwFieldID, const PRTUTF16 pcwszString, bool fNotifyUI); 90 91 HRESULT Reset(void); -
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.cpp
r67809 r67814 5 5 6 6 /* 7 * Copyright (C) 2012-201 6Oracle Corporation7 * Copyright (C) 2012-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 417 417 pcpFieldDesc->dwFieldID = field.desc.dwFieldID; 418 418 pcpFieldDesc->cpft = field.desc.cpft; 419 if (field.desc.pszLabel) 420 { 421 hr = SHStrDupW(field.desc.pszLabel, &pcpFieldDesc->pszLabel); 422 423 VBoxCredProvVerbose(0, "VBoxCredProv::GetFieldDescriptorAt: dwIndex=%ld, pszLabel=%ls\n", 424 dwIndex, 419 420 PCRTUTF16 pcwszField = NULL; 421 422 if (dwIndex != VBOXCREDPROV_FIELDID_PASSWORD) /* Don't ever get any password. Never ever, ever. */ 423 { 424 if (m_pCred) /* If we have retrieved credentials, get the actual (current) value. */ 425 pcwszField = m_pCred->getField(dwIndex); 426 else /* Otherwise get the default value. */ 427 pcwszField = field.desc.pszLabel; 428 } 429 430 hr = SHStrDupW(pcwszField ? pcwszField : L"", &pcpFieldDesc->pszLabel); 431 432 VBoxCredProvVerbose(0, "VBoxCredProv::GetFieldDescriptorAt: dwIndex=%ld, pszLabel=%ls, hr=0x%08x\n", 433 dwIndex, 425 434 #ifdef DEBUG /* Don't show any (sensitive data) in release mode. */ 426 field.desc.pszLabel);435 pcwszField ? pcwszField : L"", 427 436 #else 428 L"XXX");437 L"XXX", 429 438 #endif 430 } 439 hr); 440 431 441 pcpFieldDesc->guidFieldType = field.desc.guidFieldType; 432 442 }
Note:
See TracChangeset
for help on using the changeset viewer.