Changeset 745 for trunk/server/source3/smbd/smb2_notify.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/smbd/smb2_notify.c
r414 r745 4 4 5 5 Copyright (C) Stefan Metzmacher 2009 6 Copyright (C) Jeremy Allison 2010 6 7 7 8 This program is free software; you can redistribute it and/or modify … … 20 21 21 22 #include "includes.h" 23 #include "smbd/smbd.h" 22 24 #include "smbd/globals.h" 23 25 #include "../libcli/smb/smb_common.h" 26 #include "../lib/util/tevent_ntstatus.h" 27 28 struct smbd_smb2_notify_state { 29 struct smbd_smb2_request *smb2req; 30 struct smb_request *smbreq; 31 struct tevent_immediate *im; 32 NTSTATUS status; 33 DATA_BLOB out_output_buffer; 34 }; 24 35 25 36 static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx, … … 71 82 * Windows 2008 uses 0x00080000 72 83 */ 73 if (in_output_buffer_length > 0x00010000) {84 if (in_output_buffer_length > lp_smb2_max_trans()) { 74 85 return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER); 75 86 } … … 77 88 if (req->compat_chain_fsp) { 78 89 /* skip check */ 79 } else if (in_file_id_persistent != 0) {90 } else if (in_file_id_persistent != in_file_id_volatile) { 80 91 return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED); 81 92 } … … 109 120 NTSTATUS error; /* transport error */ 110 121 122 if (req->cancelled) { 123 struct smbd_smb2_notify_state *state = tevent_req_data(subreq, 124 struct smbd_smb2_notify_state); 125 const uint8_t *inhdr = (const uint8_t *)req->in.vector[i].iov_base; 126 uint64_t mid = BVAL(inhdr, SMB2_HDR_MESSAGE_ID); 127 128 DEBUG(10,("smbd_smb2_request_notify_done: cancelled mid %llu\n", 129 (unsigned long long)mid )); 130 error = smbd_smb2_request_error(req, NT_STATUS_CANCELLED); 131 if (!NT_STATUS_IS_OK(error)) { 132 smbd_server_connection_terminate(req->sconn, 133 nt_errstr(error)); 134 return; 135 } 136 TALLOC_FREE(state->im); 137 return; 138 } 139 111 140 status = smbd_smb2_notify_recv(subreq, 112 141 req, … … 154 183 } 155 184 156 struct smbd_smb2_notify_state {157 struct smbd_smb2_request *smb2req;158 struct smb_request *smbreq;159 struct tevent_immediate *im;160 NTSTATUS status;161 DATA_BLOB out_output_buffer;162 };163 164 185 static void smbd_smb2_notify_reply(struct smb_request *smbreq, 165 186 NTSTATUS error_code, … … 265 286 */ 266 287 267 change_notify_reply( fsp->conn,smbreq,288 change_notify_reply(smbreq, 268 289 NT_STATUS_OK, 269 290 in_output_buffer_length, … … 362 383 struct smbd_smb2_notify_state); 363 384 364 smbd_notify_cancel_by_smbreq(state->smb2req->sconn, 365 state->smbreq); 366 385 smbd_notify_cancel_by_smbreq(state->smbreq); 386 387 state->smb2req->cancelled = true; 388 tevent_req_done(req); 367 389 return true; 368 390 }
Note:
See TracChangeset
for help on using the changeset viewer.