diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-25 17:50:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:16 -0500 |
commit | fcd718c7d8a6850ae8719f23ed044b06b57501cd (patch) | |
tree | 78fe8265d44c4644b01963784a37f4505785fb97 /source4/libcli | |
parent | f88bf54c7f6d1c2ef833047eb8327953c304b5ff (diff) | |
download | samba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.tar.gz samba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.tar.bz2 samba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.zip |
r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/auth/credentials.c | 8 | ||||
-rw-r--r-- | source4/libcli/auth/credentials.h | 2 | ||||
-rw-r--r-- | source4/libcli/auth/ntlm_check.c | 8 | ||||
-rw-r--r-- | source4/libcli/auth/ntlmssp.c | 6 | ||||
-rw-r--r-- | source4/libcli/auth/ntlmssp.h | 2 | ||||
-rw-r--r-- | source4/libcli/auth/ntlmssp_parse.c | 20 | ||||
-rw-r--r-- | source4/libcli/auth/schannel.c | 2 | ||||
-rw-r--r-- | source4/libcli/auth/schannel.h | 2 | ||||
-rw-r--r-- | source4/libcli/auth/session.c | 2 | ||||
-rw-r--r-- | source4/libcli/clifile.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/clispnego.c | 10 | ||||
-rw-r--r-- | source4/libcli/raw/rawacl.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/rawdate.c | 8 | ||||
-rw-r--r-- | source4/libcli/raw/raweas.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 14 | ||||
-rw-r--r-- | source4/libcli/raw/rawtrans.c | 2 | ||||
-rw-r--r-- | source4/libcli/util/asn1.c | 26 | ||||
-rw-r--r-- | source4/libcli/util/clierror.c | 2 | ||||
-rw-r--r-- | source4/libcli/util/errormap.c | 8 | ||||
-rw-r--r-- | source4/libcli/util/smbencrypt.c | 6 | ||||
-rw-r--r-- | source4/libcli/util/smberr.c | 4 |
21 files changed, 70 insertions, 70 deletions
diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c index 139b17d5b3..cf6d0cca62 100644 --- a/source4/libcli/auth/credentials.c +++ b/source4/libcli/auth/credentials.c @@ -31,11 +31,11 @@ static void creds_init(struct creds_CredentialState *creds, const struct netr_Credential *client_challenge, const struct netr_Credential *server_challenge, - const uint8 machine_password[16]) + const uint8_t machine_password[16]) { struct netr_Credential time_cred; uint32_t sum[2]; - uint8 sum2[8]; + uint8_t sum2[8]; dump_data_pw("Client chall", client_challenge->data, sizeof(client_challenge->data)); dump_data_pw("Server chall", server_challenge->data, sizeof(server_challenge->data)); @@ -144,7 +144,7 @@ next comes the client specific functions void creds_client_init(struct creds_CredentialState *creds, const struct netr_Credential *client_challenge, const struct netr_Credential *server_challenge, - const uint8 machine_password[16], + const uint8_t machine_password[16], struct netr_Credential *initial_credential) { creds->sequence = time(NULL); @@ -197,7 +197,7 @@ next comes the server specific functions void creds_server_init(struct creds_CredentialState *creds, const struct netr_Credential *client_challenge, const struct netr_Credential *server_challenge, - const uint8 machine_password[16], + const uint8_t machine_password[16], struct netr_Credential *initial_credential) { creds_init(creds, client_challenge, server_challenge, machine_password); diff --git a/source4/libcli/auth/credentials.h b/source4/libcli/auth/credentials.h index 85efd54bc1..84787bd778 100644 --- a/source4/libcli/auth/credentials.h +++ b/source4/libcli/auth/credentials.h @@ -21,7 +21,7 @@ */ struct creds_CredentialState { - uint8 session_key[8]; + uint8_t session_key[8]; uint32_t sequence; struct netr_Credential seed; struct netr_Credential client; diff --git a/source4/libcli/auth/ntlm_check.c b/source4/libcli/auth/ntlm_check.c index 96aa352542..a3b92752aa 100644 --- a/source4/libcli/auth/ntlm_check.c +++ b/source4/libcli/auth/ntlm_check.c @@ -174,7 +174,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, const char *username, const char *client_username, const char *client_domain, - const uint8 *lm_pw, const uint8 *nt_pw, + const uint8_t *lm_pw, const uint8_t *nt_pw, DATA_BLOB *user_sess_key, DATA_BLOB *lm_sess_key) { @@ -326,7 +326,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, so use it only if we otherwise allow LM authentication */ if (lp_lanman_auth() && lm_pw) { - uint8 first_8_lm_hash[16]; + uint8_t first_8_lm_hash[16]; memcpy(first_8_lm_hash, lm_pw, 8); memset(first_8_lm_hash + 8, '\0', 8); *lm_sess_key = data_blob(first_8_lm_hash, 16); @@ -367,7 +367,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, if (smb_pwd_check_ntlmv1(lm_response, lm_pw, challenge, NULL)) { - uint8 first_8_lm_hash[16]; + uint8_t first_8_lm_hash[16]; memcpy(first_8_lm_hash, lm_pw, 8); memset(first_8_lm_hash + 8, '\0', 8); *user_sess_key = data_blob(first_8_lm_hash, 16); @@ -427,7 +427,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, allow LM authentication */ if (lp_lanman_auth() && lm_pw) { - uint8 first_8_lm_hash[16]; + uint8_t first_8_lm_hash[16]; memcpy(first_8_lm_hash, lm_pw, 8); memset(first_8_lm_hash + 8, '\0', 8); *user_sess_key = data_blob(first_8_lm_hash, 16); diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c index 54b219f879..4f6c6d02c9 100644 --- a/source4/libcli/auth/ntlmssp.c +++ b/source4/libcli/auth/ntlmssp.c @@ -105,7 +105,7 @@ void debug_ntlmssp_flags(uint32_t neg_flags) * */ -static const uint8 *get_challenge(const struct ntlmssp_state *ntlmssp_state) +static const uint8_t *get_challenge(const struct ntlmssp_state *ntlmssp_state) { static uchar chal[8]; generate_random_buffer(chal, sizeof(chal), False); @@ -430,7 +430,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, uint32_t neg_flags = 0; uint32_t ntlmssp_command, chal_flags; char *cliname=NULL, *domname=NULL; - const uint8 *cryptkey; + const uint8_t *cryptkey; const char *target_name; /* parse the NTLMSSP packet */ @@ -1184,7 +1184,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state, the password-derived key */ if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_KEY_EXCH) { /* Make up a new session key */ - uint8 client_session_key[16]; + uint8_t client_session_key[16]; generate_random_buffer(client_session_key, sizeof(client_session_key), False); /* Encrypt the new session key with the old one */ diff --git a/source4/libcli/auth/ntlmssp.h b/source4/libcli/auth/ntlmssp.h index 95713de6c5..28487c1ab5 100644 --- a/source4/libcli/auth/ntlmssp.h +++ b/source4/libcli/auth/ntlmssp.h @@ -121,7 +121,7 @@ typedef struct ntlmssp_state * @return 8 bytes of challnege data, determined by the server to be the challenge for NTLM authentication * */ - const uint8 *(*get_challenge)(const struct ntlmssp_state *ntlmssp_state); + const uint8_t *(*get_challenge)(const struct ntlmssp_state *ntlmssp_state); /** * Callback to find if the challenge used by NTLM authentication may be modified diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c index 91596e7bdb..aa4fc6b98f 100644 --- a/source4/libcli/auth/ntlmssp_parse.c +++ b/source4/libcli/auth/ntlmssp_parse.c @@ -46,7 +46,7 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, int i, n; va_list ap; char *s; - uint8 *b; + uint8_t *b; int head_size=0, data_size=0; int head_ofs, data_ofs; @@ -70,12 +70,12 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, data_size += (str_charnum(s) * 2) + 4; break; case 'B': - b = va_arg(ap, uint8 *); + b = va_arg(ap, uint8_t *); head_size += 8; data_size += va_arg(ap, int); break; case 'b': - b = va_arg(ap, uint8 *); + b = va_arg(ap, uint8_t *); head_size += va_arg(ap, int); break; case 'd': @@ -131,7 +131,7 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, break; case 'B': - b = va_arg(ap, uint8 *); + b = va_arg(ap, uint8_t *); n = va_arg(ap, int); SSVAL(blob->data, head_ofs, n); head_ofs += 2; SSVAL(blob->data, head_ofs, n); head_ofs += 2; @@ -145,7 +145,7 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, SIVAL(blob->data, head_ofs, n); head_ofs += 4; break; case 'b': - b = va_arg(ap, uint8 *); + b = va_arg(ap, uint8_t *); n = va_arg(ap, int); memcpy(blob->data + head_ofs, b, n); head_ofs += n; @@ -216,7 +216,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, /* if odd length and unicode */ return False; } - if (blob->data + ptr < (uint8 *)ptr || blob->data + ptr < blob->data) + if (blob->data + ptr < (uint8_t *)ptr || blob->data + ptr < blob->data) return False; if (0 < len1) { @@ -247,7 +247,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, return False; } - if (blob->data + ptr < (uint8 *)ptr || blob->data + ptr < blob->data) + if (blob->data + ptr < (uint8_t *)ptr || blob->data + ptr < blob->data) return False; if (0 < len1) { @@ -278,7 +278,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, return False; } - if (blob->data + ptr < (uint8 *)ptr || blob->data + ptr < blob->data) + if (blob->data + ptr < (uint8_t *)ptr || blob->data + ptr < blob->data) return False; *b = data_blob_talloc(mem_ctx, blob->data + ptr, len1); @@ -289,7 +289,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, len1 = va_arg(ap, unsigned); /* make sure its in the right format - be strict */ NEED_DATA(len1); - if (blob->data + head_ofs < (uint8 *)head_ofs || blob->data + head_ofs < blob->data) + if (blob->data + head_ofs < (uint8_t *)head_ofs || blob->data + head_ofs < blob->data) return False; *b = data_blob_talloc(mem_ctx, blob->data + head_ofs, len1); @@ -303,7 +303,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, case 'C': s = va_arg(ap, char *); - if (blob->data + head_ofs < (uint8 *)head_ofs || blob->data + head_ofs < blob->data) + if (blob->data + head_ofs < (uint8_t *)head_ofs || blob->data + head_ofs < blob->data) return False; head_ofs += pull_string(NULL, p, blob->data+head_ofs, sizeof(p), diff --git a/source4/libcli/auth/schannel.c b/source4/libcli/auth/schannel.c index 59d0c4aa7d..0a26db3037 100644 --- a/source4/libcli/auth/schannel.c +++ b/source4/libcli/auth/schannel.c @@ -286,7 +286,7 @@ void schannel_end(struct schannel_state **state) create an schannel context state */ NTSTATUS schannel_start(struct schannel_state **state, - uint8 session_key[16], + uint8_t session_key[16], BOOL initiator) { TALLOC_CTX *mem_ctx; diff --git a/source4/libcli/auth/schannel.h b/source4/libcli/auth/schannel.h index 74507c547d..b074b104fb 100644 --- a/source4/libcli/auth/schannel.h +++ b/source4/libcli/auth/schannel.h @@ -24,7 +24,7 @@ struct schannel_state { TALLOC_CTX *mem_ctx; - uint8 session_key[16]; + uint8_t session_key[16]; uint32_t seq_num; BOOL initiator; DATA_BLOB signature; diff --git a/source4/libcli/auth/session.c b/source4/libcli/auth/session.c index 77eb1a6527..1176d7fd0d 100644 --- a/source4/libcli/auth/session.c +++ b/source4/libcli/auth/session.c @@ -37,7 +37,7 @@ void sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *sessi for (i=0,k=0; i<in->length; i += 8, k += 7) { - uint8 bin[8], bout[8], key[7]; + uint8_t bin[8], bout[8], key[7]; memset(bin, 0, 8); memcpy(bin, &in->data[i], MIN(8, in->length-i)); diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index a417ae621c..d1f9145e44 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -227,7 +227,7 @@ int cli_nt_create_full(struct cli_tree *tree, const char *fname, uint32_t CreatFlags, uint32_t DesiredAccess, uint32_t FileAttributes, uint32_t ShareAccess, uint32_t CreateDisposition, uint32_t CreateOptions, - uint8 SecurityFlags) + uint8_t SecurityFlags) { union smb_open open_parms; TALLOC_CTX *mem_ctx; diff --git a/source4/libcli/raw/clispnego.c b/source4/libcli/raw/clispnego.c index 7ad6be1006..ff7d45c8c1 100644 --- a/source4/libcli/raw/clispnego.c +++ b/source4/libcli/raw/clispnego.c @@ -26,7 +26,7 @@ generate a negTokenInit packet given a GUID, a list of supported OIDs (the mechanisms) and a principal name string */ -DATA_BLOB spnego_gen_negTokenInit(uint8 guid[16], +DATA_BLOB spnego_gen_negTokenInit(uint8_t guid[16], const char *OIDs[], const char *principal) { @@ -260,7 +260,7 @@ BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *se /* generate a krb5 GSS-API wrapper packet given a ticket */ -DATA_BLOB spnego_gen_krb5_wrap(DATA_BLOB ticket, const uint8 tok_id[2]) +DATA_BLOB spnego_gen_krb5_wrap(DATA_BLOB ticket, const uint8_t tok_id[2]) { ASN1_DATA data; DATA_BLOB ret; @@ -288,7 +288,7 @@ DATA_BLOB spnego_gen_krb5_wrap(DATA_BLOB ticket, const uint8 tok_id[2]) /* parse a krb5 GSS-API wrapper packet giving a ticket */ -BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2]) +BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8_t tok_id[2]) { BOOL ret; ASN1_DATA data; @@ -453,7 +453,7 @@ DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status, { ASN1_DATA data; DATA_BLOB ret; - uint8 negResult; + uint8_t negResult; if (NT_STATUS_IS_OK(nt_status)) { negResult = SPNEGO_NEG_RESULT_ACCEPT; @@ -496,7 +496,7 @@ BOOL spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status, DATA_BLOB *auth) { ASN1_DATA data; - uint8 negResult; + uint8_t negResult; if (NT_STATUS_IS_OK(nt_status)) { negResult = SPNEGO_NEG_RESULT_ACCEPT; diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c index cfc086c7ce..ca93591597 100644 --- a/source4/libcli/raw/rawacl.c +++ b/source4/libcli/raw/rawacl.c @@ -27,7 +27,7 @@ struct cli_request *smb_raw_query_secdesc_send(struct cli_tree *tree, struct smb_query_secdesc *query) { struct smb_nttrans nt; - uint8 params[8]; + uint8_t params[8]; nt.in.max_setup = 0; nt.in.max_param = 4; @@ -108,7 +108,7 @@ struct cli_request *smb_raw_set_secdesc_send(struct cli_tree *tree, struct smb_set_secdesc *set) { struct smb_nttrans nt; - uint8 params[8]; + uint8_t params[8]; struct ndr_push *ndr; struct cli_request *req; NTSTATUS status; diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index e80c376bf7..3b731d653b 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -27,7 +27,7 @@ put a dos date into a buffer (time/date format) This takes GMT time and puts local time for zone_offset in the buffer ********************************************************************/ void raw_push_dos_date(struct cli_transport *transport, - uint8 *buf, int offset, time_t unixdate) + uint8_t *buf, int offset, time_t unixdate) { push_dos_date(buf, offset, unixdate, transport->negotiate.server_zone); } @@ -56,7 +56,7 @@ void raw_push_dos_date3(struct cli_transport *transport, convert a dos date ********************************************************************/ time_t raw_pull_dos_date(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date(date_ptr, transport->negotiate.server_zone); } @@ -65,7 +65,7 @@ time_t raw_pull_dos_date(struct cli_transport *transport, like raw_pull_dos_date() but the words are reversed ********************************************************************/ time_t raw_pull_dos_date2(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date2(date_ptr, transport->negotiate.server_zone); } @@ -75,7 +75,7 @@ time_t raw_pull_dos_date2(struct cli_transport *transport, these arrive in server zone, with corresponding DST ******************************************************************/ time_t raw_pull_dos_date3(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date3(date_ptr, transport->negotiate.server_zone); } diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c index ae58790baa..e07fbcd288 100644 --- a/source4/libcli/raw/raweas.c +++ b/source4/libcli/raw/raweas.c @@ -68,7 +68,7 @@ uint_t ea_pull_struct(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct ea_struct *ea) { - uint8 nlen; + uint8_t nlen; uint16_t vlen; if (blob->length < 6) { diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index d7085ea3d2..fd2d85cc65 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 command, unsigned wct, unsigned buflen) + uint8_t command, unsigned wct, unsigned 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 command, unsigned wct, unsigned buflen) + uint8_t command, unsigned wct, unsigned buflen) { struct cli_request *req; uint16_t flags2; @@ -189,7 +189,7 @@ struct cli_request *cli_request_setup_session(struct cli_session *session, setup a request for tree based commands */ struct cli_request *cli_request_setup(struct cli_tree *tree, - uint8 command, + uint8_t command, unsigned wct, unsigned buflen) { struct cli_request *req; @@ -343,7 +343,7 @@ static BOOL handle_oplock_break(struct cli_transport *transport, uint_t len, con if (transport->oplock.handler) { uint16_t tid = SVAL(hdr, HDR_TID); uint16_t fnum = SVAL(vwv,VWV(2)); - uint8 level = CVAL(vwv,VWV(3)+1); + uint8_t level = CVAL(vwv,VWV(3)+1); transport->oplock.handler(transport, tid, fnum, level, transport->oplock.private); } @@ -599,7 +599,7 @@ size_t cli_req_append_string_len(struct cli_request *req, const char *str, unsig size_t cli_req_append_ascii4(struct cli_request *req, const char *str, unsigned flags) { size_t size; - cli_req_append_bytes(req, (const uint8 *)"\4", 1); + cli_req_append_bytes(req, (const uint8_t *)"\4", 1); size = cli_req_append_string(req, str, flags); return size + 1; } @@ -623,7 +623,7 @@ size_t cli_req_append_blob(struct cli_request *req, const DATA_BLOB *blob) append raw bytes into the data portion of the request packet return the number of bytes added */ -size_t cli_req_append_bytes(struct cli_request *req, const uint8 *bytes, size_t byte_len) +size_t cli_req_append_bytes(struct cli_request *req, const uint8_t *bytes, size_t byte_len) { cli_req_grow_allocation(req, byte_len + req->out.data_size); memcpy(req->out.data + req->out.data_size, bytes, byte_len); @@ -635,7 +635,7 @@ size_t cli_req_append_bytes(struct cli_request *req, const uint8 *bytes, size_t append variable block (type 5 buffer) into the data portion of the request packet return the number of bytes added */ -size_t cli_req_append_var_block(struct cli_request *req, const uint8 *bytes, uint16_t byte_len) +size_t cli_req_append_var_block(struct cli_request *req, const uint8_t *bytes, uint16_t byte_len) { cli_req_grow_allocation(req, byte_len + 3 + req->out.data_size); SCVAL(req->out.data + req->out.data_size, 0, 5); diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c index 04dbcdc87d..fb2abf3e2d 100644 --- a/source4/libcli/raw/rawtrans.c +++ b/source4/libcli/raw/rawtrans.c @@ -206,7 +206,7 @@ NTSTATUS smb_raw_trans_recv(struct cli_request *req, ****************************************************************************/ struct cli_request *smb_raw_trans_send_backend(struct cli_tree *tree, struct smb_trans2 *parms, - uint8 command) + uint8_t command) { int wct = 14 + parms->in.setup_count; struct cli_request *req; diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index 07c692f700..b44c62bc50 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -31,7 +31,7 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len) { if (data->has_error) return False; if (data->length < data->ofs+len) { - uint8 *newp; + uint8_t *newp; newp = Realloc(data->data, data->ofs+len); if (!newp) { SAFE_FREE(data->data); @@ -46,14 +46,14 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len) return True; } -/* useful fn for writing a uint8 */ -BOOL asn1_write_uint8(ASN1_DATA *data, uint8 v) +/* useful fn for writing a uint8_t */ +BOOL asn1_write_uint8(ASN1_DATA *data, uint8_t v) { return asn1_write(data, &v, 1); } /* push a tag onto the asn1 data buffer. Used for nested structures */ -BOOL asn1_push_tag(ASN1_DATA *data, uint8 tag) +BOOL asn1_push_tag(ASN1_DATA *data, uint8_t tag) { struct nesting *nesting; @@ -187,7 +187,7 @@ BOOL asn1_write_BOOLEAN2(ASN1_DATA *data, BOOL v) /* check a BOOLEAN */ BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v) { - uint8 b = 0; + uint8_t b = 0; asn1_read_uint8(data, &b); if (b != ASN1_BOOLEAN) { @@ -228,16 +228,16 @@ BOOL asn1_read(ASN1_DATA *data, void *p, int len) return True; } -/* read a uint8 from a ASN1 buffer */ -BOOL asn1_read_uint8(ASN1_DATA *data, uint8 *v) +/* read a uint8_t from a ASN1 buffer */ +BOOL asn1_read_uint8(ASN1_DATA *data, uint8_t *v) { return asn1_read(data, v, 1); } /* start reading a nested asn1 structure */ -BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag) +BOOL asn1_start_tag(ASN1_DATA *data, uint8_t tag) { - uint8 b; + uint8_t b; struct nesting *nesting; if (!asn1_read_uint8(data, &b)) @@ -314,7 +314,7 @@ int asn1_tag_remaining(ASN1_DATA *data) /* read an object ID from a ASN1 buffer */ BOOL asn1_read_OID(ASN1_DATA *data, char **OID) { - uint8 b; + uint8_t b; pstring aoid; fstring el; @@ -392,7 +392,7 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob) /* read an interger */ BOOL asn1_read_Integer(ASN1_DATA *data, int *i) { - uint8 b; + uint8_t b; *i = 0; if (!asn1_start_tag(data, ASN1_INTEGER)) return False; @@ -407,7 +407,7 @@ BOOL asn1_read_Integer(ASN1_DATA *data, int *i) /* check a enumarted value is correct */ BOOL asn1_check_enumerated(ASN1_DATA *data, int v) { - uint8 b; + uint8_t b; if (!asn1_start_tag(data, ASN1_ENUMERATED)) return False; asn1_read_uint8(data, &b); asn1_end_tag(data); @@ -419,7 +419,7 @@ BOOL asn1_check_enumerated(ASN1_DATA *data, int v) } /* write an enumarted value to the stream */ -BOOL asn1_write_enumerated(ASN1_DATA *data, uint8 v) +BOOL asn1_write_enumerated(ASN1_DATA *data, uint8_t v) { if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False; asn1_write_uint8(data, v); diff --git a/source4/libcli/util/clierror.c b/source4/libcli/util/clierror.c index 7b78d191dd..d852cd0d21 100644 --- a/source4/libcli/util/clierror.c +++ b/source4/libcli/util/clierror.c @@ -75,7 +75,7 @@ NTSTATUS cli_nt_error(struct cli_tree *tree) /* Return the DOS error from the last packet - an error class and an error code. */ -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32_t *ecode) +void cli_dos_error(struct cli_state *cli, uint8_t *eclass, uint32_t *ecode) { if (cli->transport->error.etype == ETYPE_DOS) { ntstatus_to_dos(cli->transport->error.e.nt_status, diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c index 11a07d45c7..46290baa7c 100644 --- a/source4/libcli/util/errormap.c +++ b/source4/libcli/util/errormap.c @@ -46,7 +46,7 @@ /* NT status -> dos error map */ static const struct { - uint8 dos_class; + uint8_t dos_class; uint32_t dos_code; NTSTATUS ntstatus; } ntstatus_to_dos_map[] = { @@ -612,7 +612,7 @@ static const struct { /* dos -> nt status error map */ static const struct { - uint8 dos_class; + uint8_t dos_class; uint32_t dos_code; NTSTATUS ntstatus; } dos_to_ntstatus_map[] = { @@ -1410,7 +1410,7 @@ static const struct { /***************************************************************************** convert a dos eclas/ecode to a NT status32 code *****************************************************************************/ -NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode) +NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode) { int i; if (eclass == 0 && ecode == 0) return NT_STATUS_OK; @@ -1427,7 +1427,7 @@ NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode) /***************************************************************************** convert a NT status code to a dos class/code *****************************************************************************/ -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32_t *ecode) +void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode) { int i; if (NT_STATUS_IS_OK(ntstatus)) { diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c index fa29059585..5b210394c1 100644 --- a/source4/libcli/util/smbencrypt.c +++ b/source4/libcli/util/smbencrypt.c @@ -239,7 +239,7 @@ void SMBOWFencrypt_ntv2(const uchar kr[16], } void SMBsesskeygen_ntv2(const uchar kr[16], - const uchar * nt_resp, uint8 sess_key[16]) + const uchar * nt_resp, uint8_t sess_key[16]) { /* a very nice, 128 bit, variable session key */ @@ -255,7 +255,7 @@ void SMBsesskeygen_ntv2(const uchar kr[16], #endif } -void SMBsesskeygen_ntv1(const uchar kr[16], uint8 sess_key[16]) +void SMBsesskeygen_ntv1(const uchar kr[16], uint8_t sess_key[16]) { /* yes, this session key does not change - yes, this is a problem - but it is 128 bits */ @@ -270,7 +270,7 @@ void SMBsesskeygen_ntv1(const uchar kr[16], uint8 sess_key[16]) void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16], const uchar lm_resp[24], /* only uses 8 */ - uint8 sess_key[16]) + uint8_t sess_key[16]) { /* Calculate the LM session key (effective length 40 bits, but changes with each session) */ diff --git a/source4/libcli/util/smberr.c b/source4/libcli/util/smberr.c index 577308a7c0..87cc601b8d 100644 --- a/source4/libcli/util/smberr.c +++ b/source4/libcli/util/smberr.c @@ -128,7 +128,7 @@ static const struct err_code_struct hard_msgs[] = { static const struct { - uint8 class; + uint8_t class; const char *class_name; const struct err_code_struct *err_msgs; } err_classes[] = { @@ -145,7 +145,7 @@ static const struct { /* return a dos error string given a error class and error code */ -const char *dos_errstr(uint8 class, uint16_t code) +const char *dos_errstr(uint8_t class, uint16_t code) { static char *msg; int i, j; |