Comment 7 for bug 486443

Revision history for this message
Chris Cheney (ccheney) wrote : Re: [upstream] OOo can not save files to NAS cifs

Actually if that is the cause it is probably a bug in the cifs/kernel related bits not OOo.

From man 2 fcntl:

   Mandatory locking
       (Non-POSIX.) The above record locks may be either advisory or manda‐
       tory, and are advisory by default.

       Advisory locks are not enforced and are useful only between cooperating
       processes.

       Mandatory locks are enforced for all processes. If a process tries to
       perform an incompatible access (e.g., read(2) or write(2)) on a file
       region that has an incompatible mandatory lock, then the result depends
       upon whether the O_NONBLOCK flag is enabled for its open file descrip‐
       tion. If the O_NONBLOCK flag is not enabled, then system call is
       blocked until the lock is removed or converted to a mode that is com‐
       patible with the access. If the O_NONBLOCK flag is enabled, then the
       system call fails with the error EAGAIN.

       To make use of mandatory locks, mandatory locking must be enabled both
       on the file system that contains the file to be locked, and on the file
       itself. Mandatory locking is enabled on a file system using the "-o
       mand" option to mount(8), or the MS_MANDLOCK flag for mount(2). Manda‐
       tory locking is enabled on a file by disabling group execute permission
       on the file and enabling the set-group-ID permission bit (see chmod(1)
       and chmod(2)).

       The Linux implementation of mandatory locking is unreliable. See BUGS
       below.