Index: /trunk/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp	(revision 66590)
+++ /trunk/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp	(revision 66591)
@@ -268,22 +268,28 @@
 
     /* Create a new file, always, overwrite an existing file. */
-    if (!RTStrCmp(pszCur, "ca"))
+    if (   !RTStrCmp(pszCur, "ca")
+        || !RTStrCmp(pszCur, "create-replace"))
         fMode |= RTFILE_O_CREATE_REPLACE;
     /* Create a new file if it does not exist, fail if exist. */
-    else if (!RTStrCmp(pszCur, "ce"))
+    else if (   !RTStrCmp(pszCur, "ce")
+             || !RTStrCmp(pszCur, "create"))
         fMode |= RTFILE_O_CREATE;
     /* Open existing file, create file if does not exist. */
-    else if (!RTStrCmp(pszCur, "oc"))
+    else if (   !RTStrCmp(pszCur, "oc")
+             || !RTStrCmp(pszCur, "open-create"))
         fMode |= RTFILE_O_OPEN_CREATE;
     /* Open existing file and place the file pointer at
      * the end of the file, if opened with write access.
      * Create the file if does not exist. */
-    else if (!RTStrCmp(pszCur, "oa"))
+    else if (   !RTStrCmp(pszCur, "oa")
+             || !RTStrCmp(pszCur, "open-append"))
         fMode |= RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND;
     /* Open existing, fail if does not exist. */
-    else if (!RTStrCmp(pszCur, "oe"))
+    else if (   !RTStrCmp(pszCur, "oe")
+             || !RTStrCmp(pszCur, "open"))
         fMode |= RTFILE_O_OPEN;
     /* Open and truncate existing, fail of not exist. */
-    else if (!RTStrCmp(pszCur, "ot"))
+    else if (   !RTStrCmp(pszCur, "ot")
+             || !RTStrCmp(pszCur, "open-truncate"))
         fMode |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
     else
@@ -294,6 +300,45 @@
         return VERR_INVALID_PARAMETER;
 
-    /** @todo Handle sharing mode. */
-    fMode |= RTFILE_O_DENY_NONE;
+    /*
+     * Sharing mode.
+     */
+    if (!pszSharing || !*pszSharing)
+        fMode |= RTFILE_O_DENY_NONE;
+    else
+    {
+        do
+        {
+            if (pszSharing[0] == 'n')
+            {
+                if (pszSharing[1] == 'r') /* nr (no other readers) */
+                {
+                    if (pszSharing[2] == 'w') /* nrw (no other readers or writers) */
+                    {
+                        fMode |= RTFILE_O_DENY_READWRITE;
+                        pszSharing += 3;
+                    }
+                    else
+                    {
+                        fMode |= RTFILE_O_DENY_READ;
+                        pszSharing += 2;
+                    }
+                }
+                else if (pszSharing[1] == 'w') /* nw (no other writers) */
+                {
+                    fMode |= RTFILE_O_DENY_WRITE;
+                    pszSharing += 2;
+                }
+                else
+                    return VERR_INVALID_PARAMETER;
+            }
+            else if (pszSharing[0] == 'd') /* d (don't deny delete) */
+            {
+                fMode |= RTFILE_O_DENY_WRITE;
+                pszSharing++;
+            }
+            else
+                return VERR_INVALID_PARAMETER;
+        } while (*pszSharing != '\0');
+    }
 
     /* Return. */
