VirtualBox

Changeset 4743 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Sep 12, 2007 6:25:23 PM (17 years ago)
Author:
vboxsync
Message:

Fix for when open is called on a Linux guest shared folder with O_CREAT|O_EXCL

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/dirops.c

    r4729 r4743  
    409409        }
    410410
    411         LogFunc(("sf_create_aux: calling vboxCallCreate, folder %s, flags %#x\n",
     411        LogFunc(("calling vboxCallCreate, folder %s, flags %#x\n",
    412412                 path->String.utf8, params.CreateFlags));
    413413        rc = vboxCallCreate (&client_handle, &sf_g->map, path, &params);
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r4729 r4743  
    221221                LogFunc(("O_CREAT set\n"));
    222222                params.CreateFlags |= SHFL_CF_ACT_CREATE_IF_NEW;
    223                 if (file->f_flags & O_EXCL) {
    224                         LogFunc(("O_EXCL set\n"));
    225                         params.CreateFlags |= SHFL_CF_ACT_FAIL_IF_EXISTS;
    226                 }
    227                 else {
     223                /* We ignore O_EXCL, as the Linux kernel seems to call create
     224                   beforehand itself, so O_EXCL should always fail. */
     225//                if (file->f_flags & O_EXCL) {
     226//                        LogFunc(("O_EXCL set\n"));
     227//                        params.CreateFlags |= SHFL_CF_ACT_FAIL_IF_EXISTS;
     228//                }
     229//                else {
    228230                        /* O_TRUNC combined with O_EXCL is undefined. */
    229231                        if (file->f_flags & O_TRUNC) {
     
    234236                                params.CreateFlags |= SHFL_CF_ACT_OPEN_IF_EXISTS;
    235237                        }
    236                 }
     238//                }
    237239        }
    238240        else {
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r4729 r4743  
    2222 */
    2323
     24/**
     25 * @note Anyone wishing to make changes here might wish to take a look at
     26 *  http://www.atnf.csiro.au/people/rgooch/linux/vfs.txt
     27 * which seems to be the closest there is to official documentation on
     28 * writing filesystem drivers for Linux.
     29 */
     30
    2431/*
    2532 * Suppress the definition of wchar_t from stddef.h that occurs below.
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