Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/smb_server/blob.c

    r414 r745  
    101101  return the number of bytes consumed in the output
    102102*/
    103 size_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)
     103static 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)
    111111{
    112112        int alignment = 0, ret = 0, pkt_len;
     
    143143                ret = push_string(blob->data + offset, str, dest_len, flags);
    144144        }
     145        if (ret == -1) {
     146                return -1;
     147        }
    145148
    146149        /* sometimes the string needs to be terminated, but the length
     
    174177                                   DATA_BLOB *blob,
    175178                                   const char *str,
    176                                    uint_t len_offset,
     179                                   unsigned int len_offset,
    177180                                   int default_flags,
    178181                                   int flags)
     
    198201                                     int default_str_flags)
    199202{
    200         uint_t i;
     203        unsigned int i;
    201204        DATA_BLOB guid_blob;
    202205
     
    273276
    274277        case RAW_QFS_OBJECTID_INFORMATION: {
    275                 enum ndr_err_code ndr_err;
     278                NTSTATUS status;
    276279
    277280                BLOB_CHECK(smbsrv_blob_grow_data(mem_ctx, blob, 64));
    278281
    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);
    284285                }
    285286
     
    295296                return NT_STATUS_INVALID_LEVEL;
    296297        }
    297 
    298         return NT_STATUS_INVALID_LEVEL;
    299298}
    300299
     
    305304                                       int default_str_flags)
    306305{
    307         uint_t i;
     306        unsigned int i;
    308307        size_t list_size;
    309308
     
    512511                return NT_STATUS_INVALID_LEVEL;
    513512        }
    514 
    515         return NT_STATUS_INVALID_LEVEL;
    516513}
    517514
     
    639636                return NT_STATUS_INVALID_LEVEL;
    640637        }
    641 
    642         return NT_STATUS_INVALID_LEVEL;
    643638}
    644639
     
    653648{
    654649        uint8_t *data;
    655         uint_t ofs = blob->length;
     650        unsigned int ofs = blob->length;
    656651
    657652        switch (level) {
     
    787782                return NT_STATUS_INVALID_LEVEL;
    788783        }
    789 
    790         return NT_STATUS_INVALID_LEVEL;
    791 }
     784}
Note: See TracChangeset for help on using the changeset viewer.