VirtualBox

Changeset 6382 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Jan 18, 2008 5:37:39 PM (17 years ago)
Author:
vboxsync
Message:

backed out again, needs build fixes on Windows

Location:
trunk/src/VBox/HostServices/SharedFolders
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/mappings.cpp

    r6379 r6382  
    2828 *
    2929 */
    30 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName, uint32_t fWritable)
     30int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName)
    3131{
    3232    int i;
     
    7373            FolderMapping[i].fValid    = true;
    7474            FolderMapping[i].cMappings = 0;
    75             FolderMapping[i].fWritable = fWritable;
    7675
    7776            /* Check if the host file system is case sensitive */
     
    233232}
    234233
    235 int vbsfMappingsQueryWritable (SHFLCLIENTDATA *pClient, SHFLROOT root, bool *fWritable)
    236 {
    237     int rc = VINF_SUCCESS;
    238 
    239     LogFlow(("vbsfMappingsQueryWritable: pClient = %p, root = %d\n",
    240              pClient, root));
    241 
    242     if (root >= SHFL_MAX_MAPPINGS)
    243         return VERR_INVALID_PARAMETER;
    244 
    245     if (FolderMapping[root].fValid == true)
    246         *fWritable = FolderMapping[root].fWritable;
    247     else
    248         rc = VERR_FILE_NOT_FOUND;
    249 
    250     LogFlow(("vbsfMappingsQuery:Writable return rc = %Vrc\n", rc));
    251 
    252     return rc;
    253 }
    254 
    255234static int vbsfQueryMappingIndex (PRTUTF16 utf16Name, size_t *pIndex)
    256235{
  • trunk/src/VBox/HostServices/SharedFolders/mappings.h

    r6379 r6382  
    3131    bool        fHostCaseSensitive;
    3232    bool        fGuestCaseSensitive;
    33     bool        fWritable;
    3433} MAPPING, *PMAPPING;
    3534
     
    3837bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
    3938
    40 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName, uint32_t fWritable);
     39int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName);
    4140int vbsfMappingsRemove (PSHFLSTRING pMapName);
    4241
    4342int vbsfMappingsQuery (SHFLCLIENTDATA *pClient, SHFLMAPPING *pMappings, uint32_t *pcMappings);
    4443int vbsfMappingsQueryName (SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLSTRING *pString);
    45 int vbsfMappingsQueryWritable (SHFLCLIENTDATA *pClient, SHFLROOT root, bool *fWritable);
    4644
    4745int vbsfMapFolder (SHFLCLIENTDATA *pClient, PSHFLSTRING pszMapName, RTUCS2 delimiter, bool fCaseSensitive, SHFLROOT *pRoot);
  • trunk/src/VBox/HostServices/SharedFolders/service.cpp

    r6379 r6382  
    10971097        else if (   paParms[0].type != VBOX_HGCM_SVC_PARM_PTR     /* host folder name */
    10981098                 || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR     /* guest map name */
    1099                  || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT   /* fWritable */
    11001099                )
    11011100        {
     
    11091108            SHFLSTRING *pMapName    = (SHFLSTRING *)paParms[1].u.pointer.addr;
    11101109            uint32_t cbStringMap    = paParms[1].u.pointer.size;
    1111             uint32_t fWritable      = paParms[2].u.uint32;
    11121110
    11131111            /* Verify parameters values. */
     
    11231121            {
    11241122                /* Execute the function. */
    1125                 rc = vbsfMappingsAdd (pFolderName, pMapName, fWritable);
     1123                rc = vbsfMappingsAdd (pFolderName, pMapName);
    11261124
    11271125                if (VBOX_SUCCESS(rc))
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r6379 r6382  
    10181018                }
    10191019            }
    1020 
    1021             /* write access requested? */
    1022             if (pParms->CreateFlags & (  SHFL_CF_ACT_REPLACE_IF_EXISTS
    1023                                        | SHFL_CF_ACT_OVERWRITE_IF_EXISTS
    1024                                        | SHFL_CF_ACT_CREATE_IF_NEW
    1025                                        | SHFL_CF_ACCESS_WRITE))
    1026             {
    1027                 /* is the guest allowed to write to this share? */
    1028                 bool fWritable;
    1029                 rc = vbsfMappingsQueryWritable (pClient, root, &fWritable);
    1030                 if (RT_FAILURE(rc) || !fWritable)
    1031                     return VERR_WRITE_PROTECT;
    1032             }
    1033 
    10341020            if (BIT_FLAG(pParms->CreateFlags, SHFL_CF_DIRECTORY))
    10351021            {
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