Changeset 740 for vendor/current/source4/libcli/smb2
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- Location:
- vendor/current/source4/libcli/smb2
- Files:
-
- 1 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/libcli/smb2/cancel.c
r414 r740 54 54 SIVAL(c->out.hdr, SMB2_HDR_FLAGS, 0x00000002); 55 55 SSVAL(c->out.hdr, SMB2_HDR_CREDIT, 0x0030); 56 S IVAL(c->out.hdr, SMB2_HDR_PID, r->cancel.pending_id);56 SBVAL(c->out.hdr, SMB2_HDR_ASYNC_ID, r->cancel.async_id); 57 57 SBVAL(c->out.hdr, SMB2_HDR_MESSAGE_ID, c->seqnum); 58 58 if (r->session) { -
vendor/current/source4/libcli/smb2/create.c
r414 r740 132 132 enum ndr_err_code ndr_err; 133 133 DATA_BLOB sd_blob; 134 ndr_err = ndr_push_struct_blob(&sd_blob, req, NULL, 135 io->in.sec_desc, 134 ndr_err = ndr_push_struct_blob(&sd_blob, req, io->in.sec_desc, 136 135 (ndr_push_flags_fn_t)ndr_push_security_descriptor); 137 136 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { -
vendor/current/source4/libcli/smb2/find.c
r414 r740 96 96 */ 97 97 NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, 98 uint8_t level, u int_t *count,98 uint8_t level, unsigned int *count, 99 99 union smb_search_data **io) 100 100 { … … 103 103 DATA_BLOB b; 104 104 enum smb_search_data_level smb_level; 105 u int_t next_ofs=0;105 unsigned int next_ofs=0; 106 106 107 107 switch (level) { … … 172 172 NTSTATUS smb2_find_level(struct smb2_tree *tree, TALLOC_CTX *mem_ctx, 173 173 struct smb2_find *f, 174 u int_t *count, union smb_search_data **io)174 unsigned int *count, union smb_search_data **io) 175 175 { 176 176 struct smb2_request *req; -
vendor/current/source4/libcli/smb2/lock.c
r414 r740 40 40 41 41 SSVAL(req->out.body, 0x02, io->in.lock_count); 42 SIVAL(req->out.body, 0x04, io->in. reserved);42 SIVAL(req->out.body, 0x04, io->in.lock_sequence); 43 43 smb2_push_handle(req->out.body+0x08, &io->in.file.handle); 44 44 -
vendor/current/source4/libcli/smb2/negprot.c
r414 r740 35 35 struct smb2_request *req; 36 36 uint16_t size = 0x24 + io->in.dialect_count*2; 37 enum ndr_err_code ndr_err;38 37 int i; 38 NTSTATUS status; 39 39 40 40 req = smb2_request_init(transport, SMB2_OP_NEGPROT, size, false, 0); … … 47 47 SSVAL(req->out.body, 0x06, io->in.reserved); 48 48 SIVAL(req->out.body, 0x08, io->in.capabilities); 49 ndr_err= smbcli_push_guid(req->out.body, 0x0C, &io->in.client_guid);50 if (!N DR_ERR_CODE_IS_SUCCESS(ndr_err)) {49 status = smbcli_push_guid(req->out.body, 0x0C, &io->in.client_guid); 50 if (!NT_STATUS_IS_OK(status)) { 51 51 talloc_free(req); 52 52 return NULL; … … 69 69 { 70 70 NTSTATUS status; 71 enum ndr_err_code ndr_err;72 71 73 72 if (!smb2_request_receive(req) || … … 81 80 io->out.dialect_revision = SVAL(req->in.body, 0x04); 82 81 io->out.reserved = SVAL(req->in.body, 0x06); 83 ndr_err= smbcli_pull_guid(req->in.body, 0x08, &io->in.client_guid);84 if (!N DR_ERR_CODE_IS_SUCCESS(ndr_err)) {82 status = smbcli_pull_guid(req->in.body, 0x08, &io->in.client_guid); 83 if (!NT_STATUS_IS_OK(status)) { 85 84 smb2_request_destroy(req); 86 return NT_STATUS_INTERNAL_ERROR;85 return status; 87 86 } 88 87 io->out.capabilities = IVAL(req->in.body, 0x18); -
vendor/current/source4/libcli/smb2/request.c
r414 r740 176 176 177 177 SBVAL(req->out.hdr, SMB2_HDR_SESSION_ID, tree->session->uid); 178 SIVAL(req->out.hdr, SMB2_HDR_PID, tree->session->pid); 178 179 SIVAL(req->out.hdr, SMB2_HDR_TID, tree->tid); 179 180 req->session = tree->session; -
vendor/current/source4/libcli/smb2/session.c
r414 r740 27 27 #include "auth/gensec/gensec.h" 28 28 29 #include <unistd.h> 30 29 31 /** 30 32 initialise a smb2_session structure … … 46 48 session->transport = talloc_reference(session, transport); 47 49 } 50 51 session->pid = getpid(); 48 52 49 53 /* prepare a gensec context for later use */ -
vendor/current/source4/libcli/smb2/smb2.h
r414 r740 104 104 void (*func)(struct smb2_transport *, void *); 105 105 void *private_data; 106 u int_t period;106 unsigned int period; 107 107 } idle; 108 108 … … 146 146 struct gensec_security *gensec; 147 147 uint64_t uid; 148 uint32_t pid; 148 149 DATA_BLOB session_key; 149 150 bool signing_active; … … 167 168 /* each request is in one of 3 possible states */ 168 169 enum smb2_request_state state; 169 170 170 171 struct smb2_transport *transport; 171 172 struct smb2_session *session; … … 177 178 bool do_cancel; 178 179 bool can_cancel; 179 uint 32_t pending_id;180 uint64_t async_id; 180 181 } cancel; 181 182 … … 183 184 or code detecting error. */ 184 185 NTSTATUS status; 185 186 186 187 struct smb2_request_buffer in; 187 188 struct smb2_request_buffer out; -
vendor/current/source4/libcli/smb2/transport.c
r414 r740 303 303 NT_STATUS_EQUAL(req->status, STATUS_PENDING)) { 304 304 req->cancel.can_cancel = true; 305 req->cancel. pending_id = IVAL(hdr, SMB2_HDR_PID);305 req->cancel.async_id = BVAL(hdr, SMB2_HDR_ASYNC_ID); 306 306 for (i=0; i< req->cancel.do_cancel; i++) { 307 307 smb2_cancel(req); -
vendor/current/source4/libcli/smb2/util.c
r414 r740 26 26 #include "libcli/smb2/smb2_calls.h" 27 27 #include "libcli/smb_composite/smb_composite.h" 28 #include "librpc/gen_ndr/ndr_security.h" 28 29 29 30 /* … … 109 110 NTSTATUS status; 110 111 uint32_t total_deleted = 0; 111 u int_t count, i;112 unsigned int count, i; 112 113 union smb_search_data *list; 113 114 TALLOC_CTX *tmp_ctx = talloc_new(tree); … … 221 222 return total_deleted; 222 223 } 224 225 /* 226 check if two SMB2 file handles are the same 227 */ 228 bool smb2_util_handle_equal(const struct smb2_handle h1, 229 const struct smb2_handle h2) 230 { 231 return (h1.data[0] == h2.data[0]) && (h1.data[1] == h2.data[1]); 232 }
Note:
See TracChangeset
for help on using the changeset viewer.