mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
3 places where the VFS backend doesn't handle NULL strings.
(This used to be commit cf109460aff5a8437ab7eba05e4d7316a131080e)
This commit is contained in:
parent
26b8701321
commit
5fb241e5d3
@ -80,6 +80,11 @@ void smb2srv_create_recv(struct smb2srv_request *req)
|
||||
/* TODO: parse the blob */
|
||||
ZERO_STRUCT(io->smb2.in.eas);
|
||||
|
||||
/* the VFS backend does not yet handle NULL filenames */
|
||||
if (io->smb2.in.fname == NULL) {
|
||||
io->smb2.in.fname = "";
|
||||
}
|
||||
|
||||
SMB2SRV_CALL_NTVFS_BACKEND(ntvfs_open(req->ntvfs, io));
|
||||
}
|
||||
|
||||
|
@ -161,6 +161,11 @@ void smb2srv_find_recv(struct smb2srv_request *req)
|
||||
SMB2SRV_CHECK(smb2_pull_o16s16_string(&req->in, info, req->in.body+0x18, &info->in.pattern));
|
||||
info->in.max_response_size = IVAL(req->in.body, 0x1C);
|
||||
|
||||
/* the VFS backend does not yet handle NULL patterns */
|
||||
if (info->in.pattern == NULL) {
|
||||
info->in.pattern = "";
|
||||
}
|
||||
|
||||
SMB2SRV_CHECK_FILE_HANDLE(info->in.file.ntvfs);
|
||||
SMB2SRV_CALL_NTVFS_BACKEND(smb2srv_find_backend(state));
|
||||
}
|
||||
|
@ -394,6 +394,11 @@ void smb2srv_tcon_recv(struct smb2srv_request *req)
|
||||
io->smb2.in.reserved = SVAL(req->in.body, 0x02);
|
||||
SMB2SRV_CHECK(smb2_pull_o16s16_string(&req->in, io, req->in.body+0x04, &io->smb2.in.path));
|
||||
|
||||
/* the VFS backend does not yet handle NULL paths */
|
||||
if (io->smb2.in.path == NULL) {
|
||||
io->smb2.in.path = "";
|
||||
}
|
||||
|
||||
req->status = smb2srv_tcon_backend(req, io);
|
||||
|
||||
if (req->control_flags & SMB2SRV_REQ_CTRL_FLAG_NOT_REPLY) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user