opnsense-src/sys
Andriy Gapon 602cf4e4a7 MFV r319951: 8311 ZFS_READONLY is a little too strict
illumos/illumos-gate@2889ec41c0
2889ec41c0

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
2017-06-14 16:55:47 +00:00
..
amd64 Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
arm Enable HWPMC overflow IRQ on both CPUs in MPIC 2017-06-13 18:55:21 +00:00
arm64 Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
boot Enable HWPMC overflow IRQ on both CPUs in MPIC 2017-06-13 18:55:21 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam Listening sockets improvements. 2017-06-08 21:30:34 +00:00
cddl MFV r319951: 8311 ZFS_READONLY is a little too strict 2017-06-14 16:55:47 +00:00
compat Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
conf Introduce Armada 38x/XP network controller support 2017-06-13 18:46:29 +00:00
contrib [iwmfw] 8000C ver 22 firmware. 2017-06-04 21:27:39 +00:00
crypto Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
ddb Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
dev Don't call vm_pager_page_unswapped() when writing or deleting a dirty page. 2017-06-14 03:55:11 +00:00
fs Define NFS_MAXXDR as the upper bound on XDR overhead in an NFS RPC. 2017-06-12 23:41:20 +00:00
gdb
geom Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
gnu [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
i386 Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern ddb show files: fix up file types and whitespace 2017-06-14 07:46:52 +00:00
kgssapi
libkern arm64: add ".arch armv8-a+crc" to allow use of crc instructions 2017-06-08 20:06:09 +00:00
mips Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
modules Add missing header dependencies (based on looking in the .depend file). 2017-06-13 14:07:13 +00:00
net Add new sysctl to allow changing of timing of the txq timers. 2017-06-13 23:16:38 +00:00
net80211 net80211: initialize i_seq for A-MPDU frames. 2017-06-01 20:46:43 +00:00
netgraph Check return value from soaccept(). 2017-06-14 16:13:20 +00:00
netinet Listening sockets improvements. 2017-06-08 21:30:34 +00:00
netinet6 Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro. 2017-05-30 14:50:28 +00:00
netipsec Build kdebug_secreplay() function only when IPSEC_DEBUG is defined. 2017-06-01 10:04:12 +00:00
netpfil Fix the queue delay estimation in PIE/FQ-PIE when the timestamp 2017-05-19 08:38:03 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed Fix indentation. 2017-06-14 16:55:23 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Actually add the mpc85xx_get_platform_clock() function. 2017-06-14 04:26:37 +00:00
riscv Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
rpc Listening sockets improvements. 2017-06-08 21:30:34 +00:00
security Correct bitwise test in mac_bsdextended ugidfw_rule_valid() 2017-06-13 01:17:58 +00:00
sparc64 Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
sys Fix HWPMC interrupt handling in Counting Mode 2017-06-13 18:51:23 +00:00
teken Oops, my fix for bright colors broke bright black some more (in cases 2017-03-27 10:48:28 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of 2017-05-25 05:23:47 +00:00
ufs Mitigate several problems with the softdep_request_cleanup() on busy 2017-06-03 16:18:50 +00:00
vm When we are in UMA_STARTUP use startup_alloc() for any zone, not for 2017-06-08 21:33:19 +00:00
x86 Don't try to assign interrupts to a CPU on single-CPU systems. 2017-06-14 13:34:09 +00:00
xdr * limit size of buffers to RPC_MAXDATASIZE 2017-06-01 06:12:25 +00:00
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00