diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-10 21:23:53 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-10 21:23:53 +0300 |
commit | 826c484166f0f74bd8fc09220f99dc937c9297cf (patch) | |
tree | a4396d5c54cfbbf6edecd5eb3d51b402c6c0c86e /fs/smb/server/smb_common.c | |
parent | e21165bfbc6c5d259466a7b2eccb66630e807bfb (diff) | |
parent | 5a5409d90bd05f87fe5623a749ccfbf3f7c7d400 (diff) | |
download | linux-826c484166f0f74bd8fc09220f99dc937c9297cf.tar.xz |
Merge tag '6.7-rc-smb3-server-part2' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French:
- slab out of bounds fix in ACL handling
- fix malformed request oops
- minor doc fix
* tag '6.7-rc-smb3-server-part2' of git://git.samba.org/ksmbd:
ksmbd: handle malformed smb1 message
ksmbd: fix kernel-doc comment of ksmbd_vfs_kern_path_locked()
ksmbd: fix slab out of bounds write in smb_inherit_dacl()
Diffstat (limited to 'fs/smb/server/smb_common.c')
-rw-r--r-- | fs/smb/server/smb_common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/smb/server/smb_common.c b/fs/smb/server/smb_common.c index e6ba1e9b8589..6691ae68af0c 100644 --- a/fs/smb/server/smb_common.c +++ b/fs/smb/server/smb_common.c @@ -366,11 +366,22 @@ static int smb1_allocate_rsp_buf(struct ksmbd_work *work) return 0; } +/** + * set_smb1_rsp_status() - set error type in smb response header + * @work: smb work containing smb response header + * @err: error code to set in response + */ +static void set_smb1_rsp_status(struct ksmbd_work *work, __le32 err) +{ + work->send_no_response = 1; +} + static struct smb_version_ops smb1_server_ops = { .get_cmd_val = get_smb1_cmd_val, .init_rsp_hdr = init_smb1_rsp_hdr, .allocate_rsp_buf = smb1_allocate_rsp_buf, .check_user_session = smb1_check_user_session, + .set_rsp_status = set_smb1_rsp_status, }; static int smb1_negotiate(struct ksmbd_work *work) |