VirtualBox

Ignore:
Timestamp:
Feb 9, 2010 2:21:31 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57467
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette