VirtualBox

Ignore:
Timestamp:
Jul 6, 2017 8:37:31 AM (7 years ago)
Author:
vboxsync
Message:

Additions/VBoxCredProv: Also try to return the current values in VBoxCredProvProvider::GetFieldDescriptorAt() (except passwords), as Windows 10 also uses those values for the new logon UI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.cpp

    r67809 r67814  
    55
    66/*
    7  * Copyright (C) 2012-2016 Oracle Corporation
     7 * Copyright (C) 2012-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    417417            pcpFieldDesc->dwFieldID     = field.desc.dwFieldID;
    418418            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,
    425434#ifdef DEBUG /* Don't show any (sensitive data) in release mode. */
    426                                     field.desc.pszLabel);
     435                                pcwszField ? pcwszField : L"",
    427436#else
    428                                     L"XXX");
     437                                L"XXX",
    429438#endif
    430             }
     439                                hr);
     440
    431441            pcpFieldDesc->guidFieldType = field.desc.guidFieldType;
    432442        }
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