Work by @gwr.

>From issue 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.
```

Gordon can answer the questions, if any.
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/392

-- Commit Summary --

  * 8311 ZFS_READONLY is a little too strict

-- File Changes --

    M usr/src/pkg/manifests/system-test-zfstest.mf (2)
    A usr/src/test/zfs-tests/cmd/dos_ro/Makefile (22)
    A usr/src/test/zfs-tests/cmd/dos_ro/dos_ro.c (143)
    M usr/src/test/zfs-tests/include/commands.cfg (1)
    M usr/src/test/zfs-tests/runfiles/delphix.run (3)
    M usr/src/test/zfs-tests/runfiles/omnios.run (3)
    M usr/src/test/zfs-tests/runfiles/openindiana.run (3)
    M usr/src/test/zfs-tests/tests/functional/acl/cifs/cifs_attr_003_pos.ksh 
(14)
    A usr/src/test/zfs-tests/tests/functional/acl/cifs/cifs_attr_004_pos.ksh 
(141)
    M usr/src/uts/common/fs/zfs/zfs_acl.c (28)
    M usr/src/uts/common/fs/zfs/zfs_vnops.c (19)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/392.patch
https://github.com/openzfs/openzfs/pull/392.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/392

------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb6ca17b06450145d-M2739ce516f391f4f2b1ca3fb
Powered by Topicbox: https://topicbox.com

Reply via email to