Changeset 745 for trunk/server/source4/smb_server/blob.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/source4/smb_server/blob.c
r414 r745 101 101 return the number of bytes consumed in the output 102 102 */ 103 s ize_t smbsrv_blob_push_string(TALLOC_CTX *mem_ctx,104 DATA_BLOB *blob,105 uint32_t len_offset,106 uint32_t offset,107 const char *str,108 int dest_len,109 int default_flags,110 int flags)103 static ssize_t smbsrv_blob_push_string(TALLOC_CTX *mem_ctx, 104 DATA_BLOB *blob, 105 uint32_t len_offset, 106 uint32_t offset, 107 const char *str, 108 int dest_len, 109 int default_flags, 110 int flags) 111 111 { 112 112 int alignment = 0, ret = 0, pkt_len; … … 143 143 ret = push_string(blob->data + offset, str, dest_len, flags); 144 144 } 145 if (ret == -1) { 146 return -1; 147 } 145 148 146 149 /* sometimes the string needs to be terminated, but the length … … 174 177 DATA_BLOB *blob, 175 178 const char *str, 176 u int_t len_offset,179 unsigned int len_offset, 177 180 int default_flags, 178 181 int flags) … … 198 201 int default_str_flags) 199 202 { 200 u int_t i;203 unsigned int i; 201 204 DATA_BLOB guid_blob; 202 205 … … 273 276 274 277 case RAW_QFS_OBJECTID_INFORMATION: { 275 enum ndr_err_code ndr_err;278 NTSTATUS status; 276 279 277 280 BLOB_CHECK(smbsrv_blob_grow_data(mem_ctx, blob, 64)); 278 281 279 ndr_err = ndr_push_struct_blob(&guid_blob, mem_ctx, NULL, 280 &fsinfo->objectid_information.out.guid, 281 (ndr_push_flags_fn_t)ndr_push_GUID); 282 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 283 BLOB_CHECK(ndr_map_error2ntstatus(ndr_err)); 282 status = GUID_to_ndr_blob(&fsinfo->objectid_information.out.guid, mem_ctx, &guid_blob); 283 if (!NT_STATUS_IS_OK(status)) { 284 BLOB_CHECK(status); 284 285 } 285 286 … … 295 296 return NT_STATUS_INVALID_LEVEL; 296 297 } 297 298 return NT_STATUS_INVALID_LEVEL;299 298 } 300 299 … … 305 304 int default_str_flags) 306 305 { 307 u int_t i;306 unsigned int i; 308 307 size_t list_size; 309 308 … … 512 511 return NT_STATUS_INVALID_LEVEL; 513 512 } 514 515 return NT_STATUS_INVALID_LEVEL;516 513 } 517 514 … … 639 636 return NT_STATUS_INVALID_LEVEL; 640 637 } 641 642 return NT_STATUS_INVALID_LEVEL;643 638 } 644 639 … … 653 648 { 654 649 uint8_t *data; 655 u int_t ofs = blob->length;650 unsigned int ofs = blob->length; 656 651 657 652 switch (level) { … … 787 782 return NT_STATUS_INVALID_LEVEL; 788 783 } 789 790 return NT_STATUS_INVALID_LEVEL; 791 } 784 }
Note:
See TracChangeset
for help on using the changeset viewer.