From 627f49d8c95400cc041a61b0a6526ba5a0eb8b4b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 10 Jul 2006 10:27:02 +0000 Subject: r16910: - don't search the wildcard handle (a handle with all bits set to 1 is justed for some SMB2 Ioctl calls...) - don't crash if we didn't find the tcon metze (This used to be commit 27087818c7e8cbaadbcd640fe3b0ffc1c3455b04) --- source4/smb_server/smb2/tcon.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/smb_server') diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c index 28c505a1fd..38bf4d7ef0 100644 --- a/source4/smb_server/smb2/tcon.c +++ b/source4/smb_server/smb2/tcon.c @@ -53,10 +53,18 @@ struct ntvfs_handle *smb2srv_pull_handle(struct smb2srv_request *req, const uint return NULL; } + /* if it's the wildcard handle, don't waste time to search it... */ + if (hid == UINT64_MAX && tid == UINT32_MAX) { + return NULL; + } + /* TODO: add comments */ tcon = req->tcon; if (tid != req->tcon->tid) { tcon = smbsrv_smb2_tcon_find(req->session, tid, req->request_time); + if (!tcon) { + return NULL; + } } handle = smbsrv_smb2_handle_find(tcon, hid, req->request_time); -- cgit