From f65041cbf18d9e3778e549179edb3e134a1608b1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 17 Aug 2007 10:05:14 +0000 Subject: r24512: Fix RAW-NOTIFY With the inbuf consistency checks we have to more correctly fake the inbuf (This used to be commit 2b8ecda30fc57bb4027b7208d22d85d213074158) --- source3/smbd/notify.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index cf64acae07..0bdf466092 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -156,6 +156,7 @@ void change_notify_reply(const uint8 *request_buf, uint32 max_param, { prs_struct ps; struct smb_request *req = NULL; + uint8 tmp_request[smb_size]; if (notify_buf->num_changes == -1) { change_notify_reply_packet(request_buf, NT_STATUS_OK); @@ -180,9 +181,16 @@ void change_notify_reply(const uint8 *request_buf, uint32 max_param, goto done; } - smb_setlen(NULL, request_buf, smb_size); + memcpy(tmp_request, request_buf, smb_size); - init_smb_request(req, request_buf); + /* + * We're only interested in the header fields here + */ + + smb_setlen(NULL, (char *)tmp_request, smb_size); + SCVAL(tmp_request, smb_wct, 0); + + init_smb_request(req, tmp_request); send_nt_replies(req, NT_STATUS_OK, prs_data_p(&ps), prs_offset(&ps), NULL, 0); -- cgit