]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - sys/boot/mips/uboot/Makefile
MFV r319951: 8311 ZFS_READONLY is a little too strict
authorAndriy Gapon <avg@FreeBSD.org>
Wed, 14 Jun 2017 16:55:47 +0000 (16:55 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Wed, 14 Jun 2017 16:55:47 +0000 (16:55 +0000)
commit602cf4e4a737667e620fc76d80dfed1344adbe47
tree0d5f53e778e1e9d095a28efe9ccccc142c6d5db6
parente804572d2bba55134e9ecbcff5d52b5b06a9fad8
parentecbf7dec14cb3903b208c6d3054469c402aebe8e
MFV r319951: 8311 ZFS_READONLY is a little too strict

illumos/illumos-gate@2889ec41c05e9ffe1890b529b3111354da325aeb
https://github.com/illumos/illumos-gate/commit/2889ec41c05e9ffe1890b529b3111354da325aeb

https://www.illumos.org/issues/8311
  Description:
  There was a misunderstanding about the enforcement details of the "Read-only"
  flag introduced for SMB/CIFS compatibility, way back in 2007 in the Sun PSARC
  2007/315 case.
  The original authors thought enforcement of the READONLY flag should work
  similarly as the IMMUTABLE flag. Unfortunately, that enforcement is
  incompatible with the expectations of Windows applications using this feature
  through the SMB service. Applications assume (and the MS File System Algorithms
  MS-FSA confirms they should) that an SMB client can:
  (a) Open an SMB handle on a file with read/write access,
  (b) Set the DOS attributes to include the READONLY flag,
  (c) continue to have write access via that handle.
  This access model is essentially the same as a Unix/POSIX application that
  creates a file (with read/write access), uses fchmod() to change the file mode
  to something not granting write access (i.e. 0444), and then continues to write
  that file using the open handle it got before the mode change.
  Currently, the SMB server works-around this problem in a way that will become
  difficult to maintain as we implement support for SMB3 persistent handles, so
  SMB depends on this fix.
  I've written a test program that can be used to demonstrate this problem, and
  added it to zfs-tests (tests/functional/acl/cifs/cifs_attr_004_pos).
  It currently fails, but will pass when this problem fixed.
  Steps to Reproduce:
    Run the test program on a ZFS file system.
  Expected Results:
    Pass
  Actual Results:
    Fail.

Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Prakash Surya <prakash.surya@delphix.com>
Author: Gordon Ross <gwr@nexenta.com>
MFC after: 2 weeks
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c