VirtualBox

Changeset 26374 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 9, 2010 2:21:31 PM (15 years ago)
Author:
vboxsync
Message:

VbglR3/VBoxCredProv/pam_vbox: Return value for VbglR3CredentialsAreAvailable().

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

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

    r26045 r26374  
    217217    {
    218218        int rc;
    219         if (VbglR3CredentialsAreAvailable())
     219        rc = VbglR3CredentialsAreAvailable();
     220        if (RT_FAILURE(rc))
     221        {
     222            if (rc == VERR_NOT_FOUND)
     223                Log(("VBoxCredPoller::threadPoller: No credentials availabe.\n"));
     224            else
     225                Log(("VBoxCredPoller::threadPoller: Could not retrieve credentials! rc = %Rc\n", rc));
     226        }
     227        else
    220228        {
    221229            Log(("VBoxCredPoller::threadPoller: Credentials available.\n"));
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp

    r26243 r26374  
    3535 * Checks whether user credentials are available to the guest or not.
    3636 *
    37  * @returns true if credentials are available, false if not (or error occured).
     37 * @returns IPRT status value; VINF_SUCCESS if credentials are available,
     38 *          VERR_NOT_FOUND if not. Otherwise an error is occured.
    3839 */
    39 VBGLR3DECL(bool) VbglR3CredentialsAreAvailable(void)
     40VBGLR3DECL(int) VbglR3CredentialsAreAvailable(void)
    4041{
    4142    VMMDevCredentials Req;
     
    4546
    4647    int rc = vbglR3GRPerform(&Req.header);
    47     return RT_SUCCESS(rc)
    48         && (Req.u32Flags & VMMDEV_CREDENTIALS_PRESENT) != 0;
     48    if (RT_SUCCESS(rc))
     49    {
     50        if ((Req.u32Flags & VMMDEV_CREDENTIALS_PRESENT) == 0)
     51            rc = VERR_NOT_FOUND;
     52    }
     53    return rc;
    4954}
    5055
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