Index: /trunk/include/VBox/VBoxGuestLib.h
===================================================================
--- /trunk/include/VBox/VBoxGuestLib.h	(revision 86875)
+++ /trunk/include/VBox/VBoxGuestLib.h	(revision 86876)
@@ -823,4 +823,5 @@
 VBGLR3DECL(int)     VbglR3GuestPropConnect(uint32_t *pidClient);
 VBGLR3DECL(int)     VbglR3GuestPropDisconnect(HGCMCLIENTID idClient);
+VBGLR3DECL(bool)    VbglR3GuestPropExist(uint32_t idClient, const char *pszPropName);
 VBGLR3DECL(int)     VbglR3GuestPropWrite(HGCMCLIENTID idClient, const char *pszName, const char *pszValue, const char *pszFlags);
 VBGLR3DECL(int)     VbglR3GuestPropWriteValue(HGCMCLIENTID idClient, const char *pszName, const char *pszValue);
@@ -831,4 +832,6 @@
 VBGLR3DECL(int)     VbglR3GuestPropRead(HGCMCLIENTID idClient, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue,
                                         uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
+VBGLR3DECL(int)     VbglR3GuestPropReadEx(uint32_t u32ClientId,
+                                          const char *pszPropName, char **ppszValue, char **ppszFlags, uint64_t *puTimestamp);
 VBGLR3DECL(int)     VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue,
                                              uint32_t *pcchValueActual);
Index: /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp	(revision 86875)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp	(revision 86876)
@@ -38,4 +38,5 @@
 #endif
 #include <iprt/assert.h>
+#include <iprt/mem.h>
 #include <iprt/stdarg.h>
 #include <VBox/err.h>
@@ -150,4 +151,17 @@
 
 /**
+ * Checks if @a pszPropName exists.
+ *
+ * @returns \c true if the guest property exists, \c false if not.
+ * @param   idClient            The HGCM client ID for the guest property session.
+ * @param   pszPropName         The property name.
+ */
+VBGLR3DECL(bool) VbglR3GuestPropExist(uint32_t idClient, const char *pszPropName)
+{
+    return RT_SUCCESS(VbglR3GuestPropReadEx(idClient, pszPropName, NULL /*ppszValue*/, NULL /* ppszFlags */, NULL /* puTimestamp */));
+}
+
+
+/**
  * Write a property value.
  *
@@ -352,4 +366,79 @@
 
     return VINF_SUCCESS;
+}
+
+/**
+ * Reads a guest property by returning allocated values.
+ *
+ * @returns VBox status code, fully bitched.
+ *
+ * @param   idClient            The HGCM client ID for the guest property session.
+ * @param   pszPropName         The property name.
+ * @param   ppszValue           Where to return the value.  This is always set
+ *                              to NULL.  Needs to be free'd using RTStrFree().  Optional.
+ * @param   ppszFlags           Where to return the value flags.
+ *                              Needs to be free'd using RTStrFree().  Optional.
+ * @param   puTimestamp         Where to return the timestamp.  This is only set
+ *                              on success.  Optional.
+ */
+VBGLR3DECL(int) VbglR3GuestPropReadEx(uint32_t idClient,
+                                      const char *pszPropName, char **ppszValue, char **ppszFlags, uint64_t *puTimestamp)
+{
+    AssertPtrReturn(pszPropName, VERR_INVALID_POINTER);
+
+    uint32_t    cbBuf = _1K;
+    void       *pvBuf = NULL;
+    int         rc    = VINF_SUCCESS;  /* MSC can't figure out the loop */
+
+    if (ppszValue)
+        *ppszValue = NULL;
+
+    for (unsigned cTries = 0; cTries < 10; cTries++)
+    {
+        /*
+         * (Re-)Allocate the buffer and try read the property.
+         */
+        RTMemFree(pvBuf);
+        pvBuf = RTMemAlloc(cbBuf);
+        if (!pvBuf)
+        {
+            rc = VERR_NO_MEMORY;
+            break;
+        }
+        char    *pszValue;
+        char    *pszFlags;
+        uint64_t uTimestamp;
+        rc = VbglR3GuestPropRead(idClient, pszPropName, pvBuf, cbBuf, &pszValue, &uTimestamp, &pszFlags, NULL);
+        if (RT_FAILURE(rc))
+        {
+            if (rc == VERR_BUFFER_OVERFLOW)
+            {
+                /* try again with a bigger buffer. */
+                cbBuf *= 2;
+                continue;
+            }
+            break;
+        }
+
+        if (ppszValue)
+        {
+            *ppszValue = RTStrDup(pszValue);
+            if (!*ppszValue)
+            {
+                rc = VERR_NO_MEMORY;
+                break;
+            }
+        }
+
+        if (puTimestamp)
+            *puTimestamp = uTimestamp;
+        if (ppszFlags)
+            *ppszFlags = RTStrDup(pszFlags);
+        break; /* done */
+    }
+
+    if (pvBuf)
+        RTMemFree(pvBuf);
+    return rc;
 }
 
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 86875)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 86876)
@@ -905,5 +905,5 @@
     if (RT_SUCCESS(rc))
     {
-        rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize");
+        rc = VbglR3GuestPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize");
         if (RT_SUCCESS(rc))
         {
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp	(revision 86875)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp	(revision 86876)
@@ -210,41 +210,25 @@
             rc = VGSvcReadPropUInt32(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold",
                                      &g_TimeSyncSetThreshold, 0, 7*24*60*60*1000 /* a week */);
-        if (   RT_SUCCESS(rc)
-            || rc == VERR_NOT_FOUND)
-        {
-            rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start");
-            if (RT_SUCCESS(rc))
-                g_fTimeSyncSetOnStart = true;
-        }
-        if (   RT_SUCCESS(rc)
-            || rc == VERR_NOT_FOUND)
-        {
-            rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-no-set-start");
-            if (RT_SUCCESS(rc))
-                g_fTimeSyncSetOnStart = false;
-        }
-        if (   RT_SUCCESS(rc)
-            || rc == VERR_NOT_FOUND)
-        {
-            rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore");
-            if (RT_SUCCESS(rc))
-                g_fTimeSyncSetOnRestore = true;
-        }
-        if (   RT_SUCCESS(rc)
-            || rc == VERR_NOT_FOUND)
-        {
-            rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-no-set-on-restore");
-            if (RT_SUCCESS(rc))
-                g_fTimeSyncSetOnRestore = false;
-        }
-        if (   RT_SUCCESS(rc)
-            || rc == VERR_NOT_FOUND)
-        {
-            uint32_t uValue;
-            rc = VGSvcReadPropUInt32(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-verbosity",
-                                     &uValue, 0 /*uMin*/, 255 /*uMax*/);
-            if (RT_SUCCESS(rc))
-                g_cTimeSyncVerbosity = uValue;
-        }
+
+        if (VbglR3GuestPropExist(uGuestPropSvcClientID,
+                                 "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"))
+            g_fTimeSyncSetOnStart = true;
+
+        if (VbglR3GuestPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-no-set-start"))
+            g_fTimeSyncSetOnStart = false;
+
+
+        if (VbglR3GuestPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore"))
+            g_fTimeSyncSetOnRestore = true;
+
+        if (VbglR3GuestPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-no-set-on-restore"))
+            g_fTimeSyncSetOnRestore = false;
+
+        uint32_t uValue;
+        rc = VGSvcReadPropUInt32(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-verbosity",
+                                 &uValue, 0 /*uMin*/, 255 /*uMax*/);
+        if (RT_SUCCESS(rc))
+            g_cTimeSyncVerbosity = uValue;
+
         VbglR3GuestPropDisconnect(uGuestPropSvcClientID);
     }
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp	(revision 86875)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp	(revision 86876)
@@ -34,87 +34,4 @@
 
 #ifdef VBOX_WITH_GUEST_PROPS
-
-/**
- * Reads a guest property.
- *
- * @returns VBox status code, fully bitched.
- *
- * @param   u32ClientId         The HGCM client ID for the guest property session.
- * @param   pszPropName         The property name.
- * @param   ppszValue           Where to return the value.  This is always set
- *                              to NULL.  Free it using RTStrFree().  Optional.
- * @param   ppszFlags           Where to return the value flags. Free it
- *                              using RTStrFree().  Optional.
- * @param   puTimestamp         Where to return the timestamp.  This is only set
- *                              on success.  Optional.
- */
-int VGSvcReadProp(uint32_t u32ClientId, const char *pszPropName, char **ppszValue, char **ppszFlags, uint64_t *puTimestamp)
-{
-    AssertPtrReturn(pszPropName, VERR_INVALID_POINTER);
-
-    uint32_t    cbBuf = _1K;
-    void       *pvBuf = NULL;
-    int         rc    = VINF_SUCCESS;  /* MSC can't figure out the loop */
-
-    if (ppszValue)
-        *ppszValue = NULL;
-
-    for (unsigned cTries = 0; cTries < 10; cTries++)
-    {
-        /*
-         * (Re-)Allocate the buffer and try read the property.
-         */
-        RTMemFree(pvBuf);
-        pvBuf = RTMemAlloc(cbBuf);
-        if (!pvBuf)
-        {
-            VGSvcError("Guest Property: Failed to allocate %zu bytes\n", cbBuf);
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-        char    *pszValue;
-        char    *pszFlags;
-        uint64_t uTimestamp;
-        rc = VbglR3GuestPropRead(u32ClientId, pszPropName, pvBuf, cbBuf, &pszValue, &uTimestamp, &pszFlags, NULL);
-        if (RT_FAILURE(rc))
-        {
-            if (rc == VERR_BUFFER_OVERFLOW)
-            {
-                /* try again with a bigger buffer. */
-                cbBuf *= 2;
-                continue;
-            }
-            if (rc == VERR_NOT_FOUND)
-                VGSvcVerbose(2, "Guest Property: %s not found\n", pszPropName);
-            else
-                VGSvcError("Guest Property: Failed to query '%s': %Rrc\n", pszPropName, rc);
-            break;
-        }
-
-        VGSvcVerbose(2, "Guest Property: Read '%s' = '%s', timestamp %RU64n\n", pszPropName, pszValue, uTimestamp);
-        if (ppszValue)
-        {
-            *ppszValue = RTStrDup(pszValue);
-            if (!*ppszValue)
-            {
-                VGSvcError("Guest Property: RTStrDup failed for '%s'\n", pszValue);
-                rc = VERR_NO_MEMORY;
-                break;
-            }
-        }
-
-        if (puTimestamp)
-            *puTimestamp = uTimestamp;
-        if (ppszFlags)
-            *ppszFlags = RTStrDup(pszFlags);
-        break; /* done */
-    }
-
-    if (pvBuf)
-        RTMemFree(pvBuf);
-    return rc;
-}
-
-
 /**
  * Reads a guest property as a 32-bit value.
@@ -130,5 +47,5 @@
 {
     char *pszValue;
-    int rc = VGSvcReadProp(u32ClientId, pszPropName, &pszValue, NULL /* ppszFlags */, NULL /* puTimestamp */);
+    int rc = VbglR3GuestPropReadEx(u32ClientId, pszPropName, &pszValue, NULL /* ppszFlags */, NULL /* puTimestamp */);
     if (RT_SUCCESS(rc))
     {
@@ -143,20 +60,4 @@
     return rc;
 }
-
-/**
- * Checks if @a pszPropName exists.
- *
- * @returns VBox status code.
- * @retval  VINF_SUCCESS if it exists.
- * @retval  VERR_NOT_FOUND if not found.
- *
- * @param   u32ClientId         The HGCM client ID for the guest property session.
- * @param   pszPropName         The property name.
- */
-int VGSvcCheckPropExist(uint32_t u32ClientId, const char *pszPropName)
-{
-    return VGSvcReadProp(u32ClientId, pszPropName, NULL /*ppszValue*/, NULL /* ppszFlags */, NULL /* puTimestamp */);
-}
-
 
 /**
@@ -183,5 +84,5 @@
     char *pszValue = NULL;
     char *pszFlags = NULL;
-    int rc = VGSvcReadProp(u32ClientId, pszPropName, &pszValue, &pszFlags, puTimestamp);
+    int rc = VbglR3GuestPropReadEx(u32ClientId, pszPropName, &pszValue, &pszFlags, puTimestamp);
     if (RT_SUCCESS(rc))
     {
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h	(revision 86875)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h	(revision 86876)
@@ -27,5 +27,4 @@
 int VGSvcReadProp(uint32_t u32ClientId, const char *pszPropName, char **ppszValue, char **ppszFlags, uint64_t *puTimestamp);
 int VGSvcReadPropUInt32(uint32_t u32ClientId, const char *pszPropName, uint32_t *pu32, uint32_t u32Min, uint32_t u32Max);
-int VGSvcCheckPropExist(uint32_t u32ClientId, const char *pszPropName);
 int VGSvcReadHostProp(uint32_t u32ClientId, const char *pszPropName, bool fReadOnly, char **ppszValue, char **ppszFlags,
                       uint64_t *puTimestamp);
Index: /trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp	(revision 86875)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp	(revision 86876)
@@ -681,52 +681,4 @@
 
 /**
- * An abbreviated copy of the VGSvcReadProp from VBoxServiceUtils.cpp
- */
-static int readGuestProperty(uint32_t u32ClientId, const char *pszPropName)
-{
-    AssertPtrReturn(pszPropName, VERR_INVALID_POINTER);
-
-    uint32_t    cbBuf = _1K;
-    void       *pvBuf = NULL;
-    int         rc    = VINF_SUCCESS;  /* MSC can't figure out the loop */
-
-    for (unsigned cTries = 0; cTries < 10; cTries++)
-    {
-        /*
-         * (Re-)Allocate the buffer and try read the property.
-         */
-        RTMemFree(pvBuf);
-        pvBuf = RTMemAlloc(cbBuf);
-        if (!pvBuf)
-        {
-            VBClLogError("Guest Property: Failed to allocate %zu bytes\n", cbBuf);
-            rc = VERR_NO_MEMORY;
-            break;
-        }
-        char    *pszValue;
-        char    *pszFlags;
-        uint64_t uTimestamp;
-        rc = VbglR3GuestPropRead(u32ClientId, pszPropName, pvBuf, cbBuf, &pszValue, &uTimestamp, &pszFlags, NULL);
-        if (RT_FAILURE(rc))
-        {
-            if (rc == VERR_BUFFER_OVERFLOW)
-            {
-                /* try again with a bigger buffer. */
-                cbBuf *= 2;
-                continue;
-            }
-            else
-                break;
-        }
-        else
-            break;
-    }
-
-    if (pvBuf)
-        RTMemFree(pvBuf);
-    return rc;
-}
-
-/**
  * We start VBoxDRMClient from VBoxService in case  some guest property is set.
  * We check the same guest property here and dont start this service in case
@@ -735,12 +687,15 @@
 static bool checkDRMClient(void)
 {
-   uint32_t uGuestPropSvcClientID;
-   int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
-   if (RT_FAILURE(rc))
-       return false;
-   rc = readGuestProperty(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize" /*pszPropName*/);
-   if (RT_FAILURE(rc))
-       return false;
-   return true;
+    bool fStartClient = false;
+
+    uint32_t idClient;
+    int rc = VbglR3GuestPropConnect(&idClient);
+    if (RT_SUCCESS(rc))
+    {
+        fStartClient = VbglR3GuestPropExist(idClient, "/VirtualBox/GuestAdd/DRMResize" /*pszPropName*/);
+        VbglR3GuestPropDisconnect(idClient);
+    }
+
+    return fStartClient;
 }
 
