diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/auth/ntlmssp_parse.c | 2 | ||||
-rw-r--r-- | source4/libcli/clifile.c | 4 | ||||
-rw-r--r-- | source4/libcli/namequery.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/clikrb5.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 32 | ||||
-rw-r--r-- | source4/libcli/util/asn1.c | 4 | ||||
-rw-r--r-- | source4/libcli/util/smbdes.c | 4 |
7 files changed, 25 insertions, 27 deletions
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c index aa4fc6b98f..251effd7e1 100644 --- a/source4/libcli/auth/ntlmssp_parse.c +++ b/source4/libcli/auth/ntlmssp_parse.c @@ -286,7 +286,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, break; case 'b': b = (DATA_BLOB *)va_arg(ap, void *); - len1 = va_arg(ap, unsigned); + len1 = va_arg(ap, uint_t); /* make sure its in the right format - be strict */ NEED_DATA(len1); if (blob->data + head_ofs < (uint8_t *)head_ofs || blob->data + head_ofs < blob->data) diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index 7f4384a222..6f1c98555b 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -268,8 +268,8 @@ int cli_open(struct cli_tree *tree, const char *fname, int flags, int share_mode) { union smb_open open_parms; - unsigned openfn=0; - unsigned accessmode=0; + uint_t openfn=0; + uint_t accessmode=0; TALLOC_CTX *mem_ctx; NTSTATUS status; diff --git a/source4/libcli/namequery.c b/source4/libcli/namequery.c index 18d1ce3e93..0094cc26bb 100644 --- a/source4/libcli/namequery.c +++ b/source4/libcli/namequery.c @@ -37,7 +37,7 @@ static int generate_trn_id(void) trn_id = sys_random(); - return trn_id % (unsigned)0x7FFF; + return trn_id % (uint_t)0x7FFF; } diff --git a/source4/libcli/raw/clikrb5.c b/source4/libcli/raw/clikrb5.c index 1d9c02f7f4..ba3e9ccd17 100644 --- a/source4/libcli/raw/clikrb5.c +++ b/source4/libcli/raw/clikrb5.c @@ -278,9 +278,9 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context, } /* cope with the ticket being in the future due to clock skew */ - if ((unsigned)credsp->times.starttime > time(NULL)) { + if ((uint_t)credsp->times.starttime > time(NULL)) { time_t t = time(NULL); - int time_offset = (unsigned)credsp->times.starttime - t; + int time_offset = (uint_t)credsp->times.starttime - t; DEBUG(4,("Advancing clock by %d seconds to cope with clock skew\n", time_offset)); krb5_set_real_time(context, t + time_offset + 1, 0); } diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index fd2d85cc65..c31f07505f 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -103,7 +103,7 @@ struct cli_request *cli_request_setup_nonsmb(struct cli_transport *transport, ui setup a SMB packet at transport level */ struct cli_request *cli_request_setup_transport(struct cli_transport *transport, - uint8_t command, unsigned wct, unsigned buflen) + uint8_t command, uint_t wct, uint_t buflen) { struct cli_request *req; @@ -149,7 +149,7 @@ struct cli_request *cli_request_setup_transport(struct cli_transport *transport, way. This interface is used before a session is setup. */ struct cli_request *cli_request_setup_session(struct cli_session *session, - uint8_t command, unsigned wct, unsigned buflen) + uint8_t command, uint_t wct, uint_t buflen) { struct cli_request *req; uint16_t flags2; @@ -190,7 +190,7 @@ struct cli_request *cli_request_setup_session(struct cli_session *session, */ struct cli_request *cli_request_setup(struct cli_tree *tree, uint8_t command, - unsigned wct, unsigned buflen) + uint_t wct, uint_t buflen) { struct cli_request *req; @@ -210,7 +210,7 @@ struct cli_request *cli_request_setup(struct cli_tree *tree, To cope with this req->out.ptr is supplied. This will be updated to point at the same offset into the packet as before this call */ -static void cli_req_grow_allocation(struct cli_request *req, unsigned new_size) +static void cli_req_grow_allocation(struct cli_request *req, uint_t new_size) { int delta; char *buf2; @@ -251,7 +251,7 @@ static void cli_req_grow_allocation(struct cli_request *req, unsigned new_size) To cope with this req->out.ptr is supplied. This will be updated to point at the same offset into the packet as before this call */ -static void cli_req_grow_data(struct cli_request *req, unsigned new_size) +static void cli_req_grow_data(struct cli_request *req, uint_t new_size) { int delta; @@ -524,7 +524,7 @@ BOOL cli_request_is_error(struct cli_request *req) return the number of bytes added to the packet */ -size_t cli_req_append_string(struct cli_request *req, const char *str, unsigned flags) +size_t cli_req_append_string(struct cli_request *req, const char *str, uint_t flags) { size_t len; @@ -555,7 +555,7 @@ size_t cli_req_append_string(struct cli_request *req, const char *str, unsigned this is used in places where the non-terminated string byte length is placed in the packet as a separate field */ -size_t cli_req_append_string_len(struct cli_request *req, const char *str, unsigned flags, int *len) +size_t cli_req_append_string_len(struct cli_request *req, const char *str, uint_t flags, int *len) { int diff = 0; size_t ret; @@ -596,7 +596,7 @@ size_t cli_req_append_string_len(struct cli_request *req, const char *str, unsig if dest_len is -1 then no limit applies */ -size_t cli_req_append_ascii4(struct cli_request *req, const char *str, unsigned flags) +size_t cli_req_append_ascii4(struct cli_request *req, const char *str, uint_t flags) { size_t size; cli_req_append_bytes(req, (const uint8_t *)"\4", 1); @@ -662,7 +662,7 @@ size_t cli_req_append_var_block(struct cli_request *req, const uint8_t *bytes, u of bytes consumed in the packet is returned */ static size_t cli_req_pull_ucs2(struct cli_request *req, TALLOC_CTX *mem_ctx, - char **dest, const char *src, int byte_len, unsigned flags) + char **dest, const char *src, int byte_len, uint_t flags) { int src_len, src_len2, alignment=0; ssize_t ret; @@ -719,7 +719,7 @@ static size_t cli_req_pull_ucs2(struct cli_request *req, TALLOC_CTX *mem_ctx, of bytes consumed in the packet is returned */ size_t cli_req_pull_ascii(struct cli_request *req, TALLOC_CTX *mem_ctx, - char **dest, const char *src, int byte_len, unsigned flags) + char **dest, const char *src, int byte_len, uint_t flags) { int src_len, src_len2; ssize_t ret; @@ -762,7 +762,7 @@ size_t cli_req_pull_ascii(struct cli_request *req, TALLOC_CTX *mem_ctx, of bytes consumed in the packet is returned */ size_t cli_req_pull_string(struct cli_request *req, TALLOC_CTX *mem_ctx, - char **dest, const char *src, int byte_len, unsigned flags) + char **dest, const char *src, int byte_len, uint_t flags) { if (!(flags & STR_ASCII) && (((flags & STR_UNICODE) || (req->flags2 & FLAGS2_UNICODE_STRINGS)))) { @@ -860,7 +860,7 @@ NTTIME cli_pull_nttime(void *base, uint16_t offset) */ static size_t cli_blob_pull_ucs2(TALLOC_CTX* mem_ctx, DATA_BLOB *blob, const char **dest, - const char *src, int byte_len, unsigned flags) + const char *src, int byte_len, uint_t flags) { int src_len, src_len2, alignment=0; ssize_t ret; @@ -919,7 +919,7 @@ static size_t cli_blob_pull_ucs2(TALLOC_CTX* mem_ctx, */ static size_t cli_blob_pull_ascii(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **dest, - const char *src, int byte_len, unsigned flags) + const char *src, int byte_len, uint_t flags) { int src_len, src_len2; ssize_t ret; @@ -968,7 +968,7 @@ size_t cli_blob_pull_string(struct cli_session *session, DATA_BLOB *blob, WIRE_STRING *dest, uint16_t len_offset, uint16_t str_offset, - unsigned flags) + uint_t flags) { int extra; dest->s = NULL; @@ -1023,7 +1023,7 @@ size_t cli_blob_pull_unix_string(struct cli_session *session, DATA_BLOB *blob, const char **dest, uint16_t str_offset, - unsigned flags) + uint_t flags) { int extra = 0; *dest = NULL; @@ -1057,7 +1057,7 @@ size_t cli_blob_pull_unix_string(struct cli_session *session, */ size_t cli_blob_append_string(struct cli_session *session, TALLOC_CTX *mem_ctx, DATA_BLOB *blob, - const char *str, unsigned flags) + const char *str, uint_t flags) { size_t max_len; int len; diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index b44c62bc50..ddefe0baa6 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -122,7 +122,7 @@ BOOL asn1_write_Integer(ASN1_DATA *data, int i) /* write an object ID to a ASN1 buffer */ BOOL asn1_write_OID(ASN1_DATA *data, const char *OID) { - unsigned v, v2; + uint_t v, v2; const char *p = (const char *)OID; char *newp; @@ -328,7 +328,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, char **OID) pstrcat(aoid, el); while (asn1_tag_remaining(data) > 0) { - unsigned v = 0; + uint_t v = 0; do { asn1_read_uint8(data, &b); v = (v<<7) | (b&0x7f); diff --git a/source4/libcli/util/smbdes.c b/source4/libcli/util/smbdes.c index 90724cb778..967d0ffb82 100644 --- a/source4/libcli/util/smbdes.c +++ b/source4/libcli/util/smbdes.c @@ -46,8 +46,6 @@ */ -#define uint8_t unsigned char - static const uint8_t perm1[56] = {57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, @@ -306,7 +304,7 @@ void smbhash(uint8_t *out, const uint8_t *in, const uint8_t *key, int forw) void E_P16(const uint8_t *p14,uint8_t *p16) { - unsigned const char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25}; + const uint8_t sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25}; smbhash(p16, sp8, p14, 1); smbhash(p16+8, sp8, p14+7, 1); } |