VirtualBox

Changeset 25332 in vbox for trunk/src


Ignore:
Timestamp:
Dec 11, 2009 2:46:40 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55916
Message:

Main/GuestProperties: compile-time option to make guest properties read-only for the guest

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r25310 r25332  
    29022902                           &parms[0]);
    29032903}
     2904
     2905/**
     2906 * Set the global flags value by calling the service
     2907 * @returns the status returned by the call to the service
     2908 *
     2909 * @param   pTable  the service instance handle
     2910 * @param   eFlags  the flags to set
     2911 */
     2912int configSetGlobalPropertyFlags(VMMDev * const pVMMDev,
     2913                                 guestProp::ePropFlags eFlags)
     2914{
     2915    VBOXHGCMSVCPARM paParm;
     2916    paParm.setUInt32(eFlags);
     2917    int rc = pVMMDev->hgcmHostCall ("VBoxGuestPropSvc",
     2918                                    guestProp::SET_GLOBAL_FLAGS_HOST, 1,
     2919                                    &paParm);
     2920    if (RT_FAILURE(rc))
     2921    {
     2922        char szFlags[guestProp::MAX_FLAGS_LEN];
     2923        if (RT_FAILURE(writeFlags(eFlags, szFlags)))
     2924            Log(("Failed to set the global flags.\n"));
     2925        else
     2926            Log(("Failed to set the global flags \"%s\".\n", szFlags));
     2927    }
     2928    return rc;
     2929}
    29042930#endif /* VBOX_WITH_GUEST_PROPS */
    29052931
     
    30313057                                         pvConsole);
    30323058
     3059#ifdef VBOX_WITH_GUEST_PROPS_RDONLY_GUEST
     3060        rc = configSetGlobalPropertyFlags(pConsole->mVMMDev,
     3061                                          guestProp::RDONLYGUEST);
     3062        AssertRCReturn(rc, rc);
     3063#endif
     3064
    30333065        Log(("Set VBoxGuestPropSvc property store\n"));
    30343066    }
  • trunk/src/VBox/Main/Makefile.kmk

    r25315 r25332  
    6363        $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL,) \
    6464        $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
     65        $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
    6566        $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,)
    6667
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