Index: /trunk/include/VBox/shflsvc.h
===================================================================
--- /trunk/include/VBox/shflsvc.h	(revision 39642)
+++ /trunk/include/VBox/shflsvc.h	(revision 39643)
@@ -116,7 +116,8 @@
 /** Remove shared folder mapping. */
 #define SHFL_FN_REMOVE_MAPPING      (2)
-/** Set the led status light address */
+/** Set the led status light address. */
 #define SHFL_FN_SET_STATUS_LED      (3)
-
+/** Allow the guest to create symbolic links (as of VBox 4.0) */
+#define SHFL_FN_ALLOW_SYMLINKS_CREATE (4)
 /** @} */
 
@@ -1338,12 +1339,9 @@
  */
 
+#define SHFL_ADD_MAPPING_F_WRITABLE         (RT_BIT_32(0))
+#define SHFL_ADD_MAPPING_F_AUTOMOUNT        (RT_BIT_32(1))
+#define SHFL_ADD_MAPPING_F_CREATE_SYMLINKS  (RT_BIT_32(2))
+
 #define SHFL_CPARMS_ADD_MAPPING  (3)
-
-/**
- * SHFL_FN_ADD_MAPPING, with auto-mount flag.
- * Host call, no guest structure is used.
- */
-
-#define SHFL_CPARMS_ADD_MAPPING2 (4)
 
 /**
Index: /trunk/src/VBox/HostServices/SharedFolders/mappings.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/mappings.cpp	(revision 39642)
+++ /trunk/src/VBox/HostServices/SharedFolders/mappings.cpp	(revision 39643)
@@ -192,5 +192,5 @@
  */
 int vbsfMappingsAdd(PSHFLSTRING pFolderName, PSHFLSTRING pMapName,
-                    uint32_t fWritable, uint32_t fAutoMount)
+                    bool fWritable, bool fAutoMount, bool fSymlinksCreate)
 {
     unsigned i;
@@ -232,8 +232,9 @@
             memcpy(FolderMapping[i].pMapName->String.ucs2, pMapName->String.ucs2, pMapName->u16Size);
 
-            FolderMapping[i].fValid     = true;
-            FolderMapping[i].cMappings  = 0;
-            FolderMapping[i].fWritable  = !!fWritable;
-            FolderMapping[i].fAutoMount = !!fAutoMount;
+            FolderMapping[i].fValid          = true;
+            FolderMapping[i].cMappings       = 0;
+            FolderMapping[i].fWritable       = fWritable;
+            FolderMapping[i].fAutoMount      = fAutoMount;
+            FolderMapping[i].fSymlinksCreate = fSymlinksCreate;
 
             /* Check if the host file system is case sensitive */
@@ -444,12 +445,8 @@
     int rc = VINF_SUCCESS;
 
-    LogFlow(("vbsfMappingsQueryWritable: pClient = %p, root = %d\n",
-             pClient, root));
-
-    MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
-    if (pFolderMapping == NULL)
-    {
-        return VERR_INVALID_PARAMETER;
-    }
+    LogFlow(("vbsfMappingsQueryWritable: pClient = %p, root = %d\n", pClient, root));
+
+    MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
+    AssertReturn(pFolderMapping, VERR_INVALID_PARAMETER);
 
     if (pFolderMapping->fValid == true)
@@ -467,12 +464,8 @@
     int rc = VINF_SUCCESS;
 
-    LogFlow(("vbsfMappingsQueryAutoMount: pClient = %p, root = %d\n",
-             pClient, root));
-
-    MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
-    if (pFolderMapping == NULL)
-    {
-        return VERR_INVALID_PARAMETER;
-    }
+    LogFlow(("vbsfMappingsQueryAutoMount: pClient = %p, root = %d\n", pClient, root));
+
+    MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
+    AssertReturn(pFolderMapping, VERR_INVALID_PARAMETER);
 
     if (pFolderMapping->fValid == true)
@@ -482,4 +475,23 @@
 
     LogFlow(("vbsfMappingsQueryAutoMount:Writable return rc = %Rrc\n", rc));
+
+    return rc;
+}
+
+int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate)
+{
+    int rc = VINF_SUCCESS;
+
+    LogFlow(("vbsfMappingsQueryAutoMount: pClient = %p, root = %d\n", pClient, root));
+
+    MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
+    AssertReturn(pFolderMapping, VERR_INVALID_PARAMETER);
+
+    if (pFolderMapping->fValid == true)
+        *fSymlinksCreate = pFolderMapping->fSymlinksCreate;
+    else
+        rc = VERR_FILE_NOT_FOUND;
+
+    LogFlow(("vbsfMappingsQueryAutoMount:SymlinksCreate return rc = %Rrc\n", rc));
 
     return rc;
Index: /trunk/src/VBox/HostServices/SharedFolders/mappings.h
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/mappings.h	(revision 39642)
+++ /trunk/src/VBox/HostServices/SharedFolders/mappings.h	(revision 39643)
@@ -23,12 +23,13 @@
 typedef struct
 {
-    char        *pszFolderName;
-    PSHFLSTRING pMapName;
-    uint32_t    cMappings;
-    bool        fValid;
-    bool        fHostCaseSensitive;
-    bool        fGuestCaseSensitive;
-    bool        fWritable;
-    bool        fAutoMount;
+    char        *pszFolderName;       /**< directory at the host to share with the guest */
+    PSHFLSTRING pMapName;             /**< share name for the guest */
+    uint32_t    cMappings;            /**< number of mappings */
+    bool        fValid;               /**< mapping entry is used/valid */
+    bool        fHostCaseSensitive;   /**< host file name space is case-sensitive */
+    bool        fGuestCaseSensitive;  /**< guest file name space is case-sensitive */
+    bool        fWritable;            /**< folder is writable for the guest */
+    bool        fAutoMount;           /**< folder will be auto-mounted by the guest */
+    bool        fSymlinksCreate;      /**< guest is able to create symlinks */
 } MAPPING;
 /** Pointer to a MAPPING structure. */
@@ -39,5 +40,6 @@
 bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
 
-int vbsfMappingsAdd(PSHFLSTRING pFolderName, PSHFLSTRING pMapName, uint32_t fWritable, uint32_t fAutoMount);
+int vbsfMappingsAdd(PSHFLSTRING pFolderName, PSHFLSTRING pMapName,
+                    bool fWritable, bool fAutoMount, bool fCreateSymlinks);
 int vbsfMappingsRemove(PSHFLSTRING pMapName);
 
@@ -45,6 +47,9 @@
 int vbsfMappingsQueryName(PSHFLCLIENTDATA pClient, SHFLROOT root, SHFLSTRING *pString);
 int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWritable);
+int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAutoMount);
+int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate);
 
-int vbsfMapFolder(PSHFLCLIENTDATA pClient, PSHFLSTRING pszMapName, RTUTF16 delimiter, bool fCaseSensitive, SHFLROOT *pRoot);
+int vbsfMapFolder(PSHFLCLIENTDATA pClient, PSHFLSTRING pszMapName, RTUTF16 delimiter,
+                  bool fCaseSensitive, SHFLROOT *pRoot);
 int vbsfUnmapFolder(PSHFLCLIENTDATA pClient, SHFLROOT root);
 
Index: /trunk/src/VBox/HostServices/SharedFolders/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/service.cpp	(revision 39642)
+++ /trunk/src/VBox/HostServices/SharedFolders/service.cpp	(revision 39643)
@@ -1259,5 +1259,7 @@
 
 /*
- * We differentiate between a function handler for the guest and one for the host. The guest is not allowed to add or remove mappings for obvious security reasons.
+ * We differentiate between a function handler for the guest (svcCall) and one
+ * for the host. The guest is not allowed to add or remove mappings for obvious
+ * security reasons.
  */
 static DECLCALLBACK(int) svcHostCall (void *, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
@@ -1283,12 +1285,6 @@
         Log(("SharedFolders host service: svcCall: SHFL_FN_ADD_MAPPING\n"));
         LogRel(("SharedFolders host service: adding host mapping\n"));
-        LogRel(("    Host path '%ls', map name '%ls', %s\n",
-                ((SHFLSTRING *)paParms[0].u.pointer.addr)->String.ucs2,
-                ((SHFLSTRING *)paParms[1].u.pointer.addr)->String.ucs2,
-                paParms[2].u.uint32 ? "writable" : "read-only"));
-
         /* Verify parameter count and types. */
         if (   (cParms != SHFL_CPARMS_ADD_MAPPING)
-            && (cParms != SHFL_CPARMS_ADD_MAPPING2) /* With auto-mount flag. */
            )
         {
@@ -1297,8 +1293,6 @@
         else if (   paParms[0].type != VBOX_HGCM_SVC_PARM_PTR     /* host folder name */
                  || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR     /* guest map name */
-                 || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT   /* fWritable */
-                 /* With auto-mount flag? */
-                 || (   cParms == SHFL_CPARMS_ADD_MAPPING2
-                     && paParms[3].type != VBOX_HGCM_SVC_PARM_32BIT))
+                 || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT   /* fFlags */
+                )
         {
             rc = VERR_INVALID_PARAMETER;
@@ -1309,10 +1303,5 @@
             SHFLSTRING *pFolderName = (SHFLSTRING *)paParms[0].u.pointer.addr;
             SHFLSTRING *pMapName    = (SHFLSTRING *)paParms[1].u.pointer.addr;
-            uint32_t fWritable      = paParms[2].u.uint32;
-            uint32_t fAutoMount     = 0; /* Disabled by default. */
-
-            /* Handle auto-mount flag if present. */
-            if (cParms == SHFL_CPARMS_ADD_MAPPING2)
-                fAutoMount = paParms[3].u.uint32;
+            uint32_t fFlags         = paParms[2].u.uint32;
 
             /* Verify parameters values. */
@@ -1325,6 +1314,16 @@
             else
             {
+                LogRel(("    Host path '%ls', map name '%ls', %s, automount=%s, create_symlinks=%s\n",
+                        ((SHFLSTRING *)paParms[0].u.pointer.addr)->String.ucs2,
+                        ((SHFLSTRING *)paParms[1].u.pointer.addr)->String.ucs2,
+                        RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_WRITABLE) ? "writable" : "read-only",
+                        RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_AUTOMOUNT) ? "true" : "false",
+                        RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_CREATE_SYMLINKS) ? "true" : "false"));
+
                 /* Execute the function. */
-                rc = vbsfMappingsAdd(pFolderName, pMapName, fWritable, fAutoMount);
+                rc = vbsfMappingsAdd(pFolderName, pMapName,
+                                     RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_WRITABLE),
+                                     RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_AUTOMOUNT),
+                                     RT_BOOL(fFlags & SHFL_ADD_MAPPING_F_CREATE_SYMLINKS));
                 if (RT_SUCCESS(rc))
                 {
Index: /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 39642)
+++ /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 39643)
@@ -42,4 +42,5 @@
 #endif
 
+#define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK)
 
 /**
@@ -136,5 +137,5 @@
     strcat(pDirEntry->szName, szWildCard);
 
-    rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, RTDIROPEN_FLAGS_NO_SYMLINKS);
+    rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, 0);
     *(pszStartComponent-1) = RTPATH_DELIMITER;
     if (RT_FAILURE(rc))
@@ -145,5 +146,5 @@
         size_t cbDirEntrySize = cbDirEntry;
 
-        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
         if (rc == VERR_NO_MORE_FILES)
             break;
@@ -473,5 +474,5 @@
 
             /** @todo don't check when creating files or directories; waste of time */
-            rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+            rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
             if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND)
             {
@@ -487,5 +488,5 @@
                     {
                         *pszSrc = 0;
-                        rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+                        rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
                         *pszSrc = RTPATH_DELIMITER;
                         if (RT_SUCCESS(rc))
@@ -523,5 +524,5 @@
                             fEndOfString = false;
                             *pszEnd = 0;
-                            rc = RTPathQueryInfoEx(pszSrc, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+                            rc = RTPathQueryInfoEx(pszSrc, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
                             Assert(rc == VINF_SUCCESS || rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND);
                         }
@@ -585,5 +586,5 @@
 static int vbsfConvertFileOpenFlags(unsigned fShflFlags, RTFMODE fMode, SHFLHANDLE handleInitial, uint32_t *pfOpen)
 {
-    uint32_t fOpen = RTFILE_O_NO_SYMLINKS;
+    uint32_t fOpen = 0;
     int rc = VINF_SUCCESS;
 
@@ -863,5 +864,5 @@
 
             /** @todo Possible race left here. */
-            if (RT_SUCCESS(RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK)))
+            if (RT_SUCCESS(RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient))))
             {
 #ifdef RT_OS_WINDOWS
@@ -1014,5 +1015,5 @@
 
             pParms->Result = SHFL_FILE_CREATED;
-            rc = RTDirCreate(pszPath, fMode, RTDIRCREATE_FLAGS_NO_SYMLINKS);
+            rc = RTDirCreate(pszPath, fMode, 0);
             if (RT_FAILURE(rc))
             {
@@ -1034,6 +1035,5 @@
         {
             /* Open the directory now */
-            rc = RTDirOpenFiltered(&pHandle->dir.Handle, pszPath,
-                                   RTDIRFILTER_NONE, RTDIROPEN_FLAGS_NO_SYMLINKS);
+            rc = RTDirOpenFiltered(&pHandle->dir.Handle, pszPath, RTDIRFILTER_NONE, 0);
             if (RT_SUCCESS(rc))
             {
@@ -1138,5 +1138,5 @@
     int rc;
 
-    rc = RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+    rc = RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
     LogFlow(("SHFL_CF_LOOKUP\n"));
     /* Client just wants to know if the object exists. */
@@ -1243,5 +1243,5 @@
             RTFSOBJINFO info;
 
-            rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+            rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
             LogFlow(("RTPathQueryInfoEx returned %Rrc\n", rc));
 
@@ -1548,6 +1548,5 @@
             if (RT_SUCCESS(rc))
             {
-                rc = RTDirOpenFiltered(&pHandle->dir.SearchHandle, pszFullPath,
-                                       RTDIRFILTER_WINNT, RTDIROPEN_FLAGS_NO_SYMLINKS);
+                rc = RTDirOpenFiltered(&pHandle->dir.SearchHandle, pszFullPath, RTDIRFILTER_WINNT, 0);
 
                 /* free the path string */
@@ -1578,5 +1577,5 @@
             pDirEntry = pDirEntryOrg;
 
-            rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+            rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
             if (rc == VERR_NO_MORE_FILES)
             {
@@ -1732,5 +1731,5 @@
     if (RT_SUCCESS(rc))
     {
-        rc = RTSymlinkRead(pszFullPath, (char *) pBuffer, cbBuffer, RTSYMLINKREAD_FLAGS_NO_SYMLINKS);
+        rc = RTSymlinkRead(pszFullPath, (char *) pBuffer, cbBuffer, 0);
 
         /* free the path string */
@@ -2179,5 +2178,5 @@
         {
             if (flags & SHFL_REMOVE_SYMLINK)
-                rc = RTSymlinkDelete(pszFullPath, RTSYMLINKDELETE_FLAGS_NO_SYMLINKS);
+                rc = RTSymlinkDelete(pszFullPath, 0);
             else if (flags & SHFL_REMOVE_FILE)
                 rc = RTFileDelete(pszFullPath);
@@ -2246,6 +2245,5 @@
             {
                 rc = RTFileMove(pszFullPathSrc, pszFullPathDest,
-                                  ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTFILEMOVE_FLAGS_REPLACE : 0)
-                                | RTFILEMOVE_FLAGS_NO_SYMLINKS);
+                                  ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTFILEMOVE_FLAGS_REPLACE : 0));
             }
             else
@@ -2253,6 +2251,5 @@
                 /* NT ignores the REPLACE flag and simply return and already exists error. */
                 rc = RTDirRename(pszFullPathSrc, pszFullPathDest,
-                                   ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTPATHRENAME_FLAGS_REPLACE : 0)
-                                 | RTPATHRENAME_FLAGS_NO_SYMLINKS);
+                                   ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTPATHRENAME_FLAGS_REPLACE : 0));
             }
         }
@@ -2293,8 +2290,10 @@
     if (RTPathStartsWithRoot(pszOldPath))
         return VERR_INVALID_NAME;
-    
-    /* Force relative pathes to be inside the shared folder. Don't allow the target to go up */
-    rc = vbsfPathCheck(pszOldPath, pOldPath->u16Length);
+
+    bool fSymlinksCreate;
+    rc = vbsfMappingsQuerySymlinksCreate(pClient, root, &fSymlinksCreate);
     AssertRCReturn(rc, rc);
+    if (!fSymlinksCreate)
+        return VERR_WRITE_PROTECT; /* XXX or VERR_TOO_MANY_SYMLINKS? */
 
     rc = vbsfBuildFullPath(pClient, root, pNewPath, pNewPath->u16Size, &pszFullNewPath, NULL);
@@ -2302,9 +2301,9 @@
 
     rc = RTSymlinkCreate(pszFullNewPath, (const char *)pOldPath->String.utf8,
-                         RTSYMLINKTYPE_UNKNOWN, RTSYMLINKCREATE_FLAGS_NO_SYMLINKS);
+                         RTSYMLINKTYPE_UNKNOWN, 0);
     if (RT_SUCCESS(rc))
     {
         RTFSOBJINFO info;
-        rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+        rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
         if (RT_SUCCESS(rc))
             vbfsCopyFsObjInfoFromIprt(pInfo, &info);
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 39642)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 39643)
@@ -7212,7 +7212,13 @@
     AssertReturn(m_pVMMDev && m_pVMMDev->isShFlActive(), E_FAIL);
 
-    VBOXHGCMSVCPARM parms[SHFL_CPARMS_ADD_MAPPING2];
+    VBOXHGCMSVCPARM parms[SHFL_CPARMS_ADD_MAPPING];
     SHFLSTRING *pFolderName, *pMapName;
     size_t cbString;
+
+    Bstr value;
+    HRESULT hrc = mMachine->GetExtraData(BstrFmt("VBoxInternal/SharedFoldersEnableSymlinksCreate/%s",
+                                                 strName.c_str()).raw(),
+                                         value.asOutParam());
+    bool fSymlinksCreate = hrc == S_OK && value == "1";
 
     Log(("Adding shared folder '%s' -> '%s'\n", strName.c_str(), aData.m_strHostPath.c_str()));
@@ -7275,18 +7281,11 @@
 
     parms[2].type = VBOX_HGCM_SVC_PARM_32BIT;
-    parms[2].u.uint32 = aData.m_fWritable;
-
-    /*
-     * Auto-mount flag; is indicated by using the SHFL_CPARMS_ADD_MAPPING2
-     * define below.  This shows the host service that we have supplied
-     * an additional parameter (auto-mount) and keeps the actual command
-     * backwards compatible.
-     */
-    parms[3].type = VBOX_HGCM_SVC_PARM_32BIT;
-    parms[3].u.uint32 = aData.m_fAutoMount;
+    parms[2].u.uint32 = (aData.m_fWritable ? SHFL_ADD_MAPPING_F_WRITABLE : 0)
+                      | (aData.m_fAutoMount ? SHFL_ADD_MAPPING_F_AUTOMOUNT : 0)
+                      | (fSymlinksCreate ? SHFL_ADD_MAPPING_F_CREATE_SYMLINKS : 0);
 
     vrc = m_pVMMDev->hgcmHostCall("VBoxSharedFolders",
                                   SHFL_FN_ADD_MAPPING,
-                                  SHFL_CPARMS_ADD_MAPPING2, &parms[0]);
+                                  SHFL_CPARMS_ADD_MAPPING, &parms[0]);
     RTMemFree(pFolderName);
     RTMemFree(pMapName);
Index: /trunk/src/VBox/Runtime/generic/RTFileMove-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/RTFileMove-generic.cpp	(revision 39642)
+++ /trunk/src/VBox/Runtime/generic/RTFileMove-generic.cpp	(revision 39643)
@@ -48,5 +48,5 @@
     AssertMsgReturn(*pszSrc, ("%p\n", pszSrc), VERR_INVALID_PARAMETER);
     AssertMsgReturn(*pszDst, ("%p\n", pszDst), VERR_INVALID_PARAMETER);
-    AssertMsgReturn(!(fMove & ~RTFILEMOVE_FLAGS_REPLACE), ("%#x\n", fMove), VERR_INVALID_PARAMETER);
+    AssertMsgReturn(!(fMove & ~(RTFILEMOVE_FLAGS_REPLACE), ("%#x\n", fMove), VERR_INVALID_PARAMETER);
 
     /*
