diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-04-22 16:28:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-04-22 16:28:31 -0700 |
commit | 71b1543c83d65af8215d7558d70fc2ecbee77dcf (patch) | |
tree | 6c743fde15dbe7fce201742b2e32fbcf5bccbae6 /fs/smb/server/vfs.c | |
parent | a2c63a3f3d687ac4f63bf4ffa04d7458a2db350b (diff) | |
parent | e9d8c2f95ab8acaf3f4d4a53682a4afa3c263692 (diff) | |
download | linux-71b1543c83d65af8215d7558d70fc2ecbee77dcf.tar.gz |
Merge tag '6.9-rc5-ksmbd-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French:
"Five ksmbd server fixes, most also for stable:
- rename fix
- two fixes for potential out of bounds
- fix for connections from MacOS (padding in close response)
- fix for when to enable persistent handles"
* tag '6.9-rc5-ksmbd-fixes' of git://git.samba.org/ksmbd:
ksmbd: add continuous availability share parameter
ksmbd: common: use struct_group_attr instead of struct_group for network_open_info
ksmbd: clear RENAME_NOREPLACE before calling vfs_rename
ksmbd: validate request buffer size in smb2_allocate_rsp_buf()
ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf
Diffstat (limited to 'fs/smb/server/vfs.c')
-rw-r--r-- | fs/smb/server/vfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c index 22f0f3db3ac92d..51b1b0bed616ee 100644 --- a/fs/smb/server/vfs.c +++ b/fs/smb/server/vfs.c @@ -754,10 +754,15 @@ retry: goto out4; } + /* + * explicitly handle file overwrite case, for compatibility with + * filesystems that may not support rename flags (e.g: fuse) + */ if ((flags & RENAME_NOREPLACE) && d_is_positive(new_dentry)) { err = -EEXIST; goto out4; } + flags &= ~(RENAME_NOREPLACE); if (old_child == trap) { err = -EINVAL; |