aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorSteve French <[email protected]>2024-08-15 14:03:43 -0500
committerSteve French <[email protected]>2024-08-15 16:04:47 -0500
commit836bb3268db405cf9021496ac4dbc26d3e4758fe (patch)
treedd840c1adb699998087426c07fe63389ec7b1a38 /lib/test_fortify/write_overflow-strncpy-src.c
parent74c2ab6d653b4c2354df65a7f7f2df1925a40a51 (diff)
smb3: fix lock breakage for cached writes
Mandatory locking is enforced for cached writes, which violates default posix semantics, and also it is enforced inconsistently. This apparently breaks recent versions of libreoffice, but can also be demonstrated by opening a file twice from the same client, locking it from handle one and writing to it from handle two (which fails, returning EACCES). Since there was already a mount option "forcemandatorylock" (which defaults to off), with this change only when the user intentionally specifies "forcemandatorylock" on mount will we break posix semantics on write to a locked range (ie we will only fail the write in this case, if the user mounts with "forcemandatorylock"). Fixes: 85160e03a79e ("CIFS: Implement caching mechanism for mandatory brlocks") Cc: [email protected] Cc: Pavel Shilovsky <[email protected]> Reported-by: [email protected] Reported-by: Kevin Ottens <[email protected]> Reviewed-by: David Howells <[email protected]> Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions