Index: /trunk/include/iprt/dir.h
===================================================================
--- /trunk/include/iprt/dir.h	(revision 39611)
+++ /trunk/include/iprt/dir.h	(revision 39612)
@@ -51,4 +51,10 @@
 RTDECL(bool) RTDirExists(const char *pszPath);
 
+/** @name RTDirCreate  flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTDIRCREATE_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
+
 /**
  * Creates a directory.
@@ -57,6 +63,7 @@
  * @param   pszPath     Path to the directory to create.
  * @param   fMode       The mode of the new directory.
- */
-RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode);
+ * @param   fCreate     Create flags, RTDIRCREATE_FLAGS_*.
+ */
+RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate);
 
 /**
@@ -295,4 +302,10 @@
 RTDECL(int) RTDirOpen(PRTDIR *ppDir, const char *pszPath);
 
+/** @name RTDirOpenFiltered  flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTDIROPENFILTERED_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
+
 /**
  * Opens a directory filtering the entries using dos style wildcards.
@@ -303,6 +316,7 @@
  * @param   enmFilter   The kind of filter to apply. Setting this to RTDIRFILTER_NONE makes
  *                      this function behave like RTDirOpen.
- */
-RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter);
+ * @param   fOpen       Open flags, RTDIROPENFILTERED_FLAGS_*.
+ */
+RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fOpen);
 
 /**
Index: /trunk/include/iprt/file.h
===================================================================
--- /trunk/include/iprt/file.h	(revision 39611)
+++ /trunk/include/iprt/file.h	(revision 39612)
@@ -213,4 +213,7 @@
 #define RTFILE_O_NO_CACHE               UINT32_C(0x00080000)
 
+/** Don't allow symbolic links as part of the path. */
+#define RTFILE_O_NO_SYMLINKS            UINT32_C(0x20000000)
+
 /** Unix file mode mask for use when creating files. */
 #define RTFILE_O_CREATE_MODE_MASK       UINT32_C(0x1ff00000)
@@ -220,12 +223,11 @@
 #define RTFILE_O_CREATE_MODE_SHIFT      20
 
-                                      /*UINT32_C(0x20000000),
-                                        UINT32_C(0x40000000)
-                                    and UINT32_C(0x80000000) are unused atm. */
+                                      /* UINT32_C(0x40000000)
+                                     and UINT32_C(0x80000000) are unused atm. */
 
 /** Mask of all valid flags.
  * @remark  This doesn't validate the access mode properly.
  */
-#define RTFILE_O_VALID_MASK             UINT32_C(0x1ffffff7)
+#define RTFILE_O_VALID_MASK             UINT32_C(0x3ffffff7)
 
 /** @} */
@@ -562,5 +564,7 @@
  * @{ */
 /** Replace destination file if present. */
-#define RTFILEMOVE_FLAGS_REPLACE    0x1
+#define RTFILEMOVE_FLAGS_REPLACE      0x1
+/** Don't allow symbolic links as part of the path. */
+#define RTFILEMOVE_FLAGS_NO_SYMLINKS  0x2
 /** @} */
 
Index: /trunk/include/iprt/mangling.h
===================================================================
--- /trunk/include/iprt/mangling.h	(revision 39611)
+++ /trunk/include/iprt/mangling.h	(revision 39612)
@@ -909,4 +909,5 @@
 # define RTPathTemp                                     RT_MANGLER(RTPathTemp)
 # define RTPathTraverseList                             RT_MANGLER(RTPathTraverseList)
+# define RTPathUnlink                                   RT_MANGLER(RTPathUnlink)
 # define RTPathUserDocuments                            RT_MANGLER(RTPathUserDocuments)
 # define RTPathUserHome                                 RT_MANGLER(RTPathUserHome)
Index: /trunk/include/iprt/path.h
===================================================================
--- /trunk/include/iprt/path.h	(revision 39611)
+++ /trunk/include/iprt/path.h	(revision 39612)
@@ -892,4 +892,6 @@
 /** This will replace attempt any target which isn't a directory. */
 #define RTPATHRENAME_FLAGS_REPLACE      RT_BIT(0)
+/** Don't allow symbolic links as part of the path. */
+#define RTPATHRENAME_FLAGS_NO_SYMLINKS  RT_BIT(1)
 /** @} */
 
@@ -907,4 +909,19 @@
 RTR3DECL(int) RTPathRename(const char *pszSrc,  const char *pszDst, unsigned fRename);
 
+/** @name RTPathUnlink flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTPATHUNLINK_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
+
+/**
+ * Removes the last component of the path.
+ *
+ * @returns IPRT status code.
+ * @param   pszPath     The path.
+ * @param   fUnlink     Unlink flags, RTPATHUNLINK_FLAGS_*.
+ */
+RTR3DECL(int) RTPathUnlink(const char *pszPath, uint32_t fUnlink);
+
 #endif /* IN_RING3 */
 
Index: /trunk/include/iprt/symlink.h
===================================================================
--- /trunk/include/iprt/symlink.h	(revision 39611)
+++ /trunk/include/iprt/symlink.h	(revision 39612)
@@ -86,4 +86,10 @@
 } RTSYMLINKTYPE;
 
+/** @name RTSymlinkCreate flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTSYMLINKCREATE_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
+
 /**
  * Creates a symbolic link (@a pszSymlink) targeting @a pszTarget.
@@ -99,6 +105,14 @@
  *                          make a guess and may attempt query information
  *                          about @a pszTarget in the process.
+ * @param   fCreate         Create flags, RTSYMLINKCREATE_FLAGS_*.
  */
-RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType);
+RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget,
+                            RTSYMLINKTYPE enmType, uint32_t fCreate);
+
+/** @name RTSymlinkDelete flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTSYMLINKDELETE_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
 
 /**
@@ -112,6 +126,13 @@
  *
  * @param   pszSymlink      The symbolic link that should be removed.
+ * @param   fDelete         Delete flags, RTSYMLINKDELETE_FLAGS_*.
  */
-RTDECL(int) RTSymlinkDelete(const char *pszSymlink);
+RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete);
+
+/** @name RTSymlinkRead  flags.
+ * @{ */
+/** Don't allow symbolic links as part of the path. */
+#define RTSYMLINKREAD_FLAGS_NO_SYMLINKS  RT_BIT(0)
+/** @} */
 
 /**
@@ -127,6 +148,7 @@
  * @param   pszTarget       The target buffer.
  * @param   cbTarget        The size of the target buffer.
+ * @param   fRead           Read flags, RTSYMLINKREAD_FLAGS_*.
  */
-RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget);
+RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead);
 
 /**
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp	(revision 39611)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp	(revision 39612)
@@ -161,5 +161,5 @@
                 if (pszPathTmp)
                 {
-                    rc = RTDirOpenFiltered(&pDirCurr, pszPathTmp, RTDIRFILTER_WINNT);
+                    rc = RTDirOpenFiltered(&pDirCurr, pszPathTmp, RTDIRFILTER_WINNT, 0);
                     RTStrFree(pszPathTmp);
                 }
@@ -248,5 +248,5 @@
 
         /* Open the directory */
-        rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPath, RTDIRFILTER_WINNT);
+        rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPath, RTDIRFILTER_WINNT, 0);
         if (RT_SUCCESS(rc))
         {
@@ -319,5 +319,5 @@
 
                         /* Open the directory */
-                        rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPathDir, RTDIRFILTER_WINNT);
+                        rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPathDir, RTDIRFILTER_WINNT, 0);
                         if (RT_FAILURE(rc))
                             break;
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp	(revision 39611)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp	(revision 39612)
@@ -989,5 +989,5 @@
                     rc = RTDirCreateFullPath(ValueUnion.psz, fDirMode);
                 else
-                    rc = RTDirCreate(ValueUnion.psz, fDirMode);
+                    rc = RTDirCreate(ValueUnion.psz, fDirMode, 0);
                 if (RT_FAILURE(rc))
                     return RTMsgErrorExit(RTEXITCODE_FAILURE, "Could not create directory '%s': %Rra\n",
Index: /trunk/src/VBox/Debugger/DBGCCommands.cpp
===================================================================
--- /trunk/src/VBox/Debugger/DBGCCommands.cpp	(revision 39611)
+++ /trunk/src/VBox/Debugger/DBGCCommands.cpp	(revision 39612)
@@ -1875,5 +1875,5 @@
 
     PRTDIR pDir;
-    rc = RTDirOpenFiltered(&pDir, szPath, RTDIRFILTER_WINNT);
+    rc = RTDirOpenFiltered(&pDir, szPath, RTDIRFILTER_WINNT, 0);
     if (RT_SUCCESS(rc))
     {
Index: /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 39611)
+++ /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 39612)
@@ -125,5 +125,5 @@
 static RTFMODE testRTDirCreateMode;
 
-extern int testRTDirCreate(const char *pszPath, RTFMODE fMode)
+extern int testRTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate)
 {
  /* RTPrintf("%s: pszPath=%s, fMode=0x%llx\n", __PRETTY_FUNCTION__, pszPath,
@@ -389,7 +389,9 @@
 }
 
-extern int testRTSymlinkDelete(const char *pszSymlink) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
+extern int testRTSymlinkDelete(const char *pszSymlink, uint32_t fDelete) 
+{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
 extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget,
-                              size_t cbTarget) { RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
+                              size_t cbTarget, uint32_t fRead)
+{ RTPrintf("%s\n", __PRETTY_FUNCTION__); return 0; }
 
 /******************************************************************************
Index: /trunk/src/VBox/HostServices/SharedFolders/teststubs.h
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/teststubs.h	(revision 39611)
+++ /trunk/src/VBox/HostServices/SharedFolders/teststubs.h	(revision 39612)
@@ -30,5 +30,5 @@
 extern int testRTDirClose(PRTDIR pDir);
 #define RTDirCreate          testRTDirCreate
-extern int testRTDirCreate(const char *pszPath, RTFMODE fMode);
+extern int testRTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate);
 #define RTDirOpen            testRTDirOpen
 extern int testRTDirOpen(PRTDIR *ppDir, const char *pszPath);
@@ -76,7 +76,7 @@
 extern int testRTPathQueryInfoEx(const char *pszPath, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags);
 #define RTSymlinkDelete      testRTSymlinkDelete
-extern int testRTSymlinkDelete(const char *pszSymlink);
+extern int testRTSymlinkDelete(const char *pszSymlink, uint32_t fDelete);
 #define RTSymlinkRead        testRTSymlinkRead
-extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget);
+extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead);
 
 #endif /* __VBSF_TEST_STUBS__H */
Index: /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 39611)
+++ /trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 39612)
@@ -139,5 +139,5 @@
     strcat(pDirEntry->szName, szWildCard);
 
-    rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT);
+    rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, RTDIROPENFILTERED_FLAGS_NO_SYMLINKS);
     *(pszStartComponent-1) = RTPATH_DELIMITER;
     if (RT_FAILURE(rc))
@@ -582,5 +582,5 @@
 static int vbsfConvertFileOpenFlags(unsigned fShflFlags, RTFMODE fMode, SHFLHANDLE handleInitial, uint32_t *pfOpen)
 {
-    uint32_t fOpen = 0;
+    uint32_t fOpen = RTFILE_O_NO_SYMLINKS;
     int rc = VINF_SUCCESS;
 
@@ -1011,5 +1011,5 @@
 
             pParms->Result = SHFL_FILE_CREATED;
-            rc = RTDirCreate(pszPath, fMode);
+            rc = RTDirCreate(pszPath, fMode, RTDIRCREATE_FLAGS_NO_SYMLINKS);
             if (RT_FAILURE(rc))
             {
@@ -1031,5 +1031,6 @@
         {
             /* Open the directory now */
-            rc = RTDirOpen(&pHandle->dir.Handle, pszPath);
+            rc = RTDirOpenFiltered(&pHandle->dir.Handle, pszPath,
+                                   RTDIRFILTER_NONE, RTDIROPENFILTERED_FLAGS_NO_SYMLINKS);
             if (RT_SUCCESS(rc))
             {
@@ -1545,5 +1546,6 @@
             if (RT_SUCCESS(rc))
             {
-                rc = RTDirOpenFiltered(&pHandle->dir.SearchHandle, pszFullPath, RTDIRFILTER_WINNT);
+                rc = RTDirOpenFiltered(&pHandle->dir.SearchHandle, pszFullPath,
+                                       RTDIRFILTER_WINNT, RTDIROPENFILTERED_FLAGS_NO_SYMLINKS);
 
                 /* free the path string */
@@ -1728,5 +1730,5 @@
     if (RT_SUCCESS(rc))
     {
-        rc = RTSymlinkRead(pszFullPath, (char *) pBuffer, cbBuffer);
+        rc = RTSymlinkRead(pszFullPath, (char *) pBuffer, cbBuffer, RTSYMLINKREAD_FLAGS_NO_SYMLINKS);
 
         /* free the path string */
@@ -1851,5 +1853,5 @@
 #endif
 
-            rc = RTFileSetMode((RTFILE)pHandle->file.Handle, fMode);
+            rc = RTFileSetMode(pHandle->file.Handle, fMode);
             if (rc != VINF_SUCCESS)
             {
@@ -2175,9 +2177,7 @@
         {
             if (flags & SHFL_REMOVE_SYMLINK)
-                rc = RTSymlinkDelete(pszFullPath);
-            else if (flags & SHFL_REMOVE_FILE)
-                rc = RTFileDelete(pszFullPath);
+                rc = RTSymlinkDelete(pszFullPath, RTSYMLINKDELETE_FLAGS_NO_SYMLINKS);
             else
-                rc = RTDirRemove(pszFullPath);
+                rc = RTPathUnlink(pszFullPath, RTPATHUNLINK_FLAGS_NO_SYMLINKS);
         }
 
@@ -2241,10 +2241,14 @@
             if (flags & SHFL_RENAME_FILE)
             {
-                rc = RTFileMove(pszFullPathSrc, pszFullPathDest, (flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTFILEMOVE_FLAGS_REPLACE : 0);
+                rc = RTFileMove(pszFullPathSrc, pszFullPathDest,
+                                  ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTFILEMOVE_FLAGS_REPLACE : 0)
+                                | RTFILEMOVE_FLAGS_NO_SYMLINKS);
             }
             else
             {
                 /* 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);
+                rc = RTDirRename(pszFullPathSrc, pszFullPathDest,
+                                   ((flags & SHFL_RENAME_REPLACE_IF_EXISTS) ? RTPATHRENAME_FLAGS_REPLACE : 0)
+                                 | RTPATHRENAME_FLAGS_NO_SYMLINKS);
             }
         }
@@ -2286,5 +2290,6 @@
         return rc;
 
-    rc = RTSymlinkCreate(pszFullNewPath, (const char *)pOldPath->String.utf8, RTSYMLINKTYPE_UNKNOWN);
+    rc = RTSymlinkCreate(pszFullNewPath, (const char *)pOldPath->String.utf8,
+                         RTSYMLINKTYPE_UNKNOWN, RTSYMLINKCREATE_FLAGS_NO_SYMLINKS);
     if (RT_SUCCESS(rc))
     {
Index: /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
===================================================================
--- /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp	(revision 39611)
+++ /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp	(revision 39612)
@@ -356,5 +356,5 @@
     ObjInfo.Attr.fMode &= ~(RTFS_UNIX_IWOTH | RTFS_UNIX_IWGRP);
 
-    rc = RTDirCreate(pszDstDirName, ObjInfo.Attr.fMode);
+    rc = RTDirCreate(pszDstDirName, ObjInfo.Attr.fMode, 0);
     if (RT_FAILURE(rc))
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create directory '%s': %Rrc", pszDstDirName, rc);
@@ -703,5 +703,5 @@
      * If all checks out correctly, rename it to the final directory.
      */
-    RTDirCreate(pszBaseDir, 0755);
+    RTDirCreate(pszBaseDir, 0755, 0);
 #ifndef RT_OS_WINDOWS
     /*
@@ -714,5 +714,5 @@
     /** @todo Ownership tricks on windows? */
 #endif
-    rc = RTDirCreate(szTmpPath, 0700);
+    rc = RTDirCreate(szTmpPath, 0700, 0);
     if (RT_FAILURE(rc))
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create temporary directory: %Rrc ('%s')", rc, szTmpPath);
Index: /trunk/src/VBox/Runtime/generic/RTDirCreateTemp-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/RTDirCreateTemp-generic.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/generic/RTDirCreateTemp-generic.cpp	(revision 39612)
@@ -100,5 +100,5 @@
         while (j-- > 0)
             pszX[j] = s_sz[RTRandU32Ex(0, RT_ELEMENTS(s_sz) - 2)];
-        int rc = RTDirCreate(pszTemplate, 0700);
+        int rc = RTDirCreate(pszTemplate, 0700, 0);
         if (RT_SUCCESS(rc))
             return rc;
Index: /trunk/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp	(revision 39612)
@@ -54,5 +54,5 @@
 
     /* First try is to create the path without any numbers. */
-    int rc = RTDirCreate(pszPath, fMode);
+    int rc = RTDirCreate(pszPath, fMode, 0);
     if (   RT_SUCCESS(rc)
         || rc != VERR_ALREADY_EXISTS)
@@ -89,5 +89,5 @@
             return (int)rc2;
         }
-        rc = RTDirCreate(pszPath, fMode);
+        rc = RTDirCreate(pszPath, fMode, 0);
         if (RT_SUCCESS(rc))
             return rc;
Index: /trunk/src/VBox/Runtime/r3/dir.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/dir.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/dir.cpp	(revision 39612)
@@ -104,5 +104,5 @@
          * where the directory exists but we don't have write access to the parent directory.
          */
-        rc = RTDirCreate(szAbsPath, fMode);
+        rc = RTDirCreate(szAbsPath, fMode, 0);
         if (rc == VERR_ALREADY_EXISTS)
             rc = VINF_SUCCESS;
@@ -674,5 +674,5 @@
 
 
-RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter)
+RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fOpen)
 {
     /*
Index: /trunk/src/VBox/Runtime/r3/dir2.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/dir2.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/dir2.cpp	(revision 39612)
@@ -116,5 +116,5 @@
 
                 //case RTDIRENTRYTYPE_SYMLINK:
-                //    rc = RTSymlinkDelete(pszBuf);
+                //    rc = RTSymlinkDelete(pszBuf, 0);
                 //    break;
 
Index: /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 39612)
@@ -78,5 +78,5 @@
 
 
-RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode)
+RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate)
 {
     int rc;
Index: /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp	(revision 39612)
@@ -523,4 +523,10 @@
 
 
+RTR3DECL(int) RTPathUnlink(const char *pszPath, uint32_t fUnlink)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+
 RTDECL(bool) RTPathExists(const char *pszPath)
 {
Index: /trunk/src/VBox/Runtime/r3/posix/symlink-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/symlink-posix.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/posix/symlink-posix.cpp	(revision 39612)
@@ -92,5 +92,5 @@
 
 
-RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType)
+RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType, uint32_t fCreate)
 {
     /*
@@ -125,10 +125,10 @@
     }
 
-    LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d): returns %Rrc\n", pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, rc));
-    return rc;
-}
-
-
-RTDECL(int) RTSymlinkDelete(const char *pszSymlink)
+    LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d, %#x): returns %Rrc\n", pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, fCreate, rc));
+    return rc;
+}
+
+
+RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 {
     char const *pszNativeSymlink;
@@ -154,10 +154,10 @@
     }
 
-    LogFlow(("RTSymlinkDelete(%p={%s}): returns %Rrc\n", pszSymlink, pszSymlink, rc));
-    return rc;
-}
-
-
-RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget)
+    LogFlow(("RTSymlinkDelete(%p={%s}, #%x): returns %Rrc\n", pszSymlink, pszSymlink, fDelete, rc));
+    return rc;
+}
+
+
+RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
 {
     char *pszMyTarget;
Index: /trunk/src/VBox/Runtime/r3/win/dir-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/dir-win.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/win/dir-win.cpp	(revision 39612)
@@ -48,5 +48,5 @@
 
 
-RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode)
+RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate)
 {
     /*
Index: /trunk/src/VBox/Runtime/r3/win/path-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/path-win.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/win/path-win.cpp	(revision 39612)
@@ -579,4 +579,10 @@
 
 
+RTR3DECL(int) RTPathUnlink(const char *pszPath, uint32_t fUnlink)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+
 RTDECL(bool) RTPathExists(const char *pszPath)
 {
Index: /trunk/src/VBox/Runtime/r3/win/symlink-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/symlink-win.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/r3/win/symlink-win.cpp	(revision 39612)
@@ -117,5 +117,5 @@
 
 
-RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType)
+RTDECL(int) RTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType, uint32_t fCreate)
 {
     /*
@@ -145,6 +145,6 @@
     if (!s_pfnCreateSymbolicLinkW)
     {
-        LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d): returns VERR_NOT_SUPPORTED - Windows API not found\n",
-                 pszSymlink, pszSymlink, pszTarget, pszTarget, enmType));
+        LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d, %#x): returns VERR_NOT_SUPPORTED - Windows API not found\n",
+                 pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, fCreate));
         return VERR_NOT_SUPPORTED;
     }
@@ -216,10 +216,10 @@
     }
 
-    LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d): returns %Rrc\n", pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, rc));
+    LogFlow(("RTSymlinkCreate(%p={%s}, %p={%s}, %d, %#x): returns %Rrc\n", pszSymlink, pszSymlink, pszTarget, pszTarget, enmType, fCreate, rc));
     return rc;
 }
 
 
-RTDECL(int) RTSymlinkDelete(const char *pszSymlink)
+RTDECL(int) RTSymlinkDelete(const char *pszSymlink, uint32_t fDelete)
 {
     /*
@@ -259,10 +259,10 @@
     }
 
-    LogFlow(("RTSymlinkDelete(%p={%s}): returns %Rrc\n", pszSymlink, pszSymlink, rc));
+    LogFlow(("RTSymlinkDelete(%p={%s}, %#x): returns %Rrc\n", pszSymlink, pszSymlink, fDelete, rc));
     return rc;
 }
 
 
-RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget)
+RTDECL(int) RTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
 {
     char *pszMyTarget;
Index: /trunk/src/VBox/Runtime/testcase/tstDir-2.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstDir-2.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/testcase/tstDir-2.cpp	(revision 39612)
@@ -42,5 +42,5 @@
         /* open */
         PRTDIR pDir;
-        int rc = RTDirOpenFiltered(&pDir, argv[i], RTDIRFILTER_WINNT);
+        int rc = RTDirOpenFiltered(&pDir, argv[i], RTDIRFILTER_WINNT, 0);
         if (RT_SUCCESS(rc))
         {
Index: /trunk/src/VBox/Runtime/testcase/tstDir-3.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstDir-3.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/testcase/tstDir-3.cpp	(revision 39612)
@@ -37,5 +37,5 @@
     unsigned cFilesMatch = 0;
     PRTDIR pDir;
-    int rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT);
+    int rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT, 0);
     if (RT_SUCCESS(rc))
     {
Index: /trunk/src/VBox/Runtime/testcase/tstRTSymlink.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTSymlink.cpp	(revision 39611)
+++ /trunk/src/VBox/Runtime/testcase/tstRTSymlink.cpp	(revision 39612)
@@ -51,6 +51,6 @@
     /* Create it.*/
     RTTESTI_CHECK_RC_OK_RETV(RTPathJoin(szPath1, sizeof(szPath1), pszBaseDir, "tstRTSymlink-link-1"));
-    RTSymlinkDelete(szPath1); /* clean up previous run */
-    RTTESTI_CHECK_RC_RETV(RTSymlinkCreate(szPath1, pszTarget, RTSYMLINKTYPE_FILE), VINF_SUCCESS);
+    RTSymlinkDelete(szPath1, 0); /* clean up previous run */
+    RTTESTI_CHECK_RC_RETV(RTSymlinkCreate(szPath1, pszTarget, RTSYMLINKTYPE_FILE, 0), VINF_SUCCESS);
 
     /* Check the predicate functions. */
@@ -61,15 +61,15 @@
     memset(szPath2, 0xff, sizeof(szPath2));
     szPath2[sizeof(szPath2) - 1] = '\0';
-    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, sizeof(szPath2)), VINF_SUCCESS);
+    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, sizeof(szPath2), 0), VINF_SUCCESS);
     RTTESTI_CHECK_MSG(strcmp(szPath2, pszTarget) == 0, ("got=\"%s\" expected=\"%s\"", szPath2, pszTarget));
 
     memset(szPath2, 0xff, sizeof(szPath2));
     szPath2[sizeof(szPath2) - 1] = '\0';
-    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, cchTarget + 1), VINF_SUCCESS);
+    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, cchTarget + 1, 0), VINF_SUCCESS);
     RTTESTI_CHECK_MSG(strcmp(szPath2, pszTarget) == 0, ("got=\"%s\" expected=\"%s\"", szPath2, pszTarget));
 
     memset(szPath2, 0xff, sizeof(szPath2));
     szPath2[sizeof(szPath2) - 1] = '\0';
-    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, cchTarget), VERR_BUFFER_OVERFLOW);
+    RTTESTI_CHECK_RC(RTSymlinkRead(szPath1, szPath2, cchTarget, 0), VERR_BUFFER_OVERFLOW);
     RTTESTI_CHECK_MSG(   strncmp(szPath2, pszTarget, cchTarget - 1) == 0
                       && szPath2[cchTarget - 1] == '\0',
@@ -109,6 +109,6 @@
 
     /* Finally, the removal of the symlink. */
-    RTTESTI_CHECK_RC(RTSymlinkDelete(szPath1), VINF_SUCCESS);
-    RTTESTI_CHECK_RC(RTSymlinkDelete(szPath1), VERR_FILE_NOT_FOUND);
+    RTTESTI_CHECK_RC(RTSymlinkDelete(szPath1, 0), VINF_SUCCESS);
+    RTTESTI_CHECK_RC(RTSymlinkDelete(szPath1, 0), VERR_FILE_NOT_FOUND);
 }
 
@@ -144,6 +144,6 @@
     RTTESTI_CHECK(!RTSymlinkIsDangling("/some/non-existing/directory/name/iprt/"));
 
-    RTTESTI_CHECK_RC(RTSymlinkRead(szExecFile, szPath1, sizeof(szPath1)), VERR_NOT_SYMLINK);
-    RTTESTI_CHECK_RC(RTSymlinkRead(szExecDir,  szPath1, sizeof(szPath1)), VERR_NOT_SYMLINK);
+    RTTESTI_CHECK_RC(RTSymlinkRead(szExecFile, szPath1, sizeof(szPath1), 0), VERR_NOT_SYMLINK);
+    RTTESTI_CHECK_RC(RTSymlinkRead(szExecDir,  szPath1, sizeof(szPath1), 0), VERR_NOT_SYMLINK);
 
     /*
Index: /trunk/src/VBox/Storage/VD.cpp
===================================================================
--- /trunk/src/VBox/Storage/VD.cpp	(revision 39611)
+++ /trunk/src/VBox/Storage/VD.cpp	(revision 39612)
@@ -3163,5 +3163,5 @@
     size_t cbPluginDirEntry = sizeof(RTDIRENTRYEX);
     /* The plugins are in the same directory as the other shared libs. */
-    rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT);
+    rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT, 0);
     if (RT_FAILURE(rc))
     {
@@ -3287,5 +3287,5 @@
     size_t cbPluginDirEntry = sizeof(RTDIRENTRYEX);
     /* The plugins are in the same directory as the other shared libs. */
-    rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT);
+    rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT, 0);
     if (RT_FAILURE(rc))
     {
Index: /trunk/src/VBox/Storage/testcase/tstVD.cpp
===================================================================
--- /trunk/src/VBox/Storage/testcase/tstVD.cpp	(revision 39611)
+++ /trunk/src/VBox/Storage/testcase/tstVD.cpp	(revision 39612)
@@ -884,5 +884,5 @@
     if (!RTDirExists("tmp"))
     {
-        rc = RTDirCreate("tmp", RTFS_UNIX_IRWXU);
+        rc = RTDirCreate("tmp", RTFS_UNIX_IRWXU, 0);
         if (RT_FAILURE(rc))
         {
Index: /trunk/src/VBox/Storage/testcase/tstVDShareable.cpp
===================================================================
--- /trunk/src/VBox/Storage/testcase/tstVDShareable.cpp	(revision 39611)
+++ /trunk/src/VBox/Storage/testcase/tstVDShareable.cpp	(revision 39612)
@@ -131,5 +131,5 @@
     if (!RTDirExists("tmp"))
     {
-        rc = RTDirCreate("tmp", RTFS_UNIX_IRWXU);
+        rc = RTDirCreate("tmp", RTFS_UNIX_IRWXU, 0);
         if (RT_FAILURE(rc))
         {
Index: /trunk/src/bldprogs/scm.cpp
===================================================================
--- /trunk/src/bldprogs/scm.cpp	(revision 39611)
+++ /trunk/src/bldprogs/scm.cpp	(revision 39612)
@@ -3818,5 +3818,5 @@
      */
     PRTDIR pDir;
-    rc = RTDirOpenFiltered(&pDir, pszBuf, RTDIRFILTER_NONE);
+    rc = RTDirOpenFiltered(&pDir, pszBuf, RTDIRFILTER_NONE, 0);
     if (RT_FAILURE(rc))
     {
Index: /trunk/src/testcase/tstRunTestcases.cpp
===================================================================
--- /trunk/src/testcase/tstRunTestcases.cpp	(revision 39611)
+++ /trunk/src/testcase/tstRunTestcases.cpp	(revision 39612)
@@ -171,5 +171,5 @@
      */
     PRTDIR pDir;
-    int rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT);
+    int rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT, 0);
     if (RT_SUCCESS(rc))
     {
