summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 16:24:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:15 -0500
commitf9d8f8843dc0ab8c9d59abde7222e0f118b86b5d (patch)
tree8c6360be102dee63e893526ac7128e9cd52d362c /source4/libcli
parent59e739a2f9f4b10f5f6184ef397f034d09959f26 (diff)
downloadsamba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.gz
samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.bz2
samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.zip
r884: convert samba4 to use [u]int32_t instead of [u]int32
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/credentials.c2
-rw-r--r--source4/libcli/auth/credentials.h2
-rw-r--r--source4/libcli/auth/ntlmssp.c16
-rw-r--r--source4/libcli/auth/ntlmssp.h6
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c6
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c4
-rw-r--r--source4/libcli/auth/schannel.h2
-rw-r--r--source4/libcli/clifile.c20
-rw-r--r--source4/libcli/raw/clikrb5.c4
-rw-r--r--source4/libcli/raw/raweas.c4
-rw-r--r--source4/libcli/raw/rawnotify.c4
-rw-r--r--source4/libcli/raw/rawrequest.c4
-rw-r--r--source4/libcli/raw/rawtrans.c10
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/libcli/util/clierror.c2
-rw-r--r--source4/libcli/util/dom_sid.c2
-rw-r--r--source4/libcli/util/errormap.c8
-rw-r--r--source4/libcli/util/smbencrypt.c2
18 files changed, 50 insertions, 50 deletions
diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c
index 5fa9d5ac4a..139b17d5b3 100644
--- a/source4/libcli/auth/credentials.c
+++ b/source4/libcli/auth/credentials.c
@@ -34,7 +34,7 @@ static void creds_init(struct creds_CredentialState *creds,
const uint8 machine_password[16])
{
struct netr_Credential time_cred;
- uint32 sum[2];
+ uint32_t sum[2];
uint8 sum2[8];
dump_data_pw("Client chall", client_challenge->data, sizeof(client_challenge->data));
diff --git a/source4/libcli/auth/credentials.h b/source4/libcli/auth/credentials.h
index a7e81d43af..85efd54bc1 100644
--- a/source4/libcli/auth/credentials.h
+++ b/source4/libcli/auth/credentials.h
@@ -22,7 +22,7 @@
struct creds_CredentialState {
uint8 session_key[8];
- uint32 sequence;
+ uint32_t sequence;
struct netr_Credential seed;
struct netr_Credential client;
struct netr_Credential server;
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index 3773c8e590..54b219f879 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -62,7 +62,7 @@ static const struct ntlmssp_callbacks {
* @param neg_flags The flags from the packet
*/
-void debug_ntlmssp_flags(uint32 neg_flags)
+void debug_ntlmssp_flags(uint32_t neg_flags)
{
DEBUG(3,("Got NTLMSSP neg_flags=0x%08x\n", neg_flags));
@@ -222,7 +222,7 @@ NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state,
const DATA_BLOB in, DATA_BLOB *out)
{
DATA_BLOB input;
- uint32 ntlmssp_command;
+ uint32_t ntlmssp_command;
int i;
*out = data_blob(NULL, 0);
@@ -317,7 +317,7 @@ void ntlmssp_end(NTLMSSP_STATE **ntlmssp_state)
*/
static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state,
- uint32 neg_flags, uint32 *chal_flags)
+ uint32_t neg_flags, uint32_t *chal_flags)
{
if (neg_flags & NTLMSSP_REQUEST_TARGET) {
*chal_flags |= NTLMSSP_CHAL_TARGET_INFO;
@@ -335,7 +335,7 @@ static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state,
}
static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
- uint32 neg_flags, BOOL allow_lm) {
+ uint32_t neg_flags, BOOL allow_lm) {
if (neg_flags & NTLMSSP_NEGOTIATE_UNICODE) {
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
ntlmssp_state->neg_flags &= ~NTLMSSP_NEGOTIATE_OEM;
@@ -427,8 +427,8 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
{
DATA_BLOB struct_blob;
fstring dnsname, dnsdomname;
- uint32 neg_flags = 0;
- uint32 ntlmssp_command, chal_flags;
+ uint32_t neg_flags = 0;
+ uint32_t ntlmssp_command, chal_flags;
char *cliname=NULL, *domname=NULL;
const uint8 *cryptkey;
const char *target_name;
@@ -545,7 +545,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state,
const DATA_BLOB request)
{
- uint32 ntlmssp_command, auth_flags;
+ uint32_t ntlmssp_command, auth_flags;
NTSTATUS nt_status;
uchar session_nonce_hash[16];
@@ -978,7 +978,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
TALLOC_CTX *out_mem_ctx,
const DATA_BLOB in, DATA_BLOB *out)
{
- uint32 chal_flags, ntlmssp_command, unkn1, unkn2;
+ uint32_t chal_flags, ntlmssp_command, unkn1, unkn2;
DATA_BLOB server_domain_blob;
DATA_BLOB challenge_blob;
DATA_BLOB struct_blob = data_blob(NULL, 0);
diff --git a/source4/libcli/auth/ntlmssp.h b/source4/libcli/auth/ntlmssp.h
index d3d39e8465..95713de6c5 100644
--- a/source4/libcli/auth/ntlmssp.h
+++ b/source4/libcli/auth/ntlmssp.h
@@ -77,7 +77,7 @@ typedef struct ntlmssp_state
unsigned int ref_count;
enum NTLMSSP_ROLE role;
enum server_types server_role;
- uint32 expected_state;
+ uint32_t expected_state;
BOOL unicode;
BOOL use_ntlmv2;
@@ -103,7 +103,7 @@ typedef struct ntlmssp_state
DATA_BLOB nt_resp;
DATA_BLOB session_key;
- uint32 neg_flags; /* the current state of negotiation with the NTLMSSP partner */
+ uint32_t neg_flags; /* the current state of negotiation with the NTLMSSP partner */
/* internal variables used by NTLM2 */
BOOL doing_ntlm2;
@@ -163,7 +163,7 @@ typedef struct ntlmssp_state
/* SMB Signing */
- uint32 ntlmssp_seq_num;
+ uint32_t ntlmssp_seq_num;
/* ntlmv2 */
char send_sign_key[16];
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c
index 6ddaeebb06..6d0d644a89 100644
--- a/source4/libcli/auth/ntlmssp_parse.c
+++ b/source4/libcli/auth/ntlmssp_parse.c
@@ -191,8 +191,8 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
DATA_BLOB *b;
size_t head_ofs = 0;
uint16 len1, len2;
- uint32 ptr;
- uint32 *v;
+ uint32_t ptr;
+ uint32_t *v;
pstring p;
va_start(ap, format);
@@ -296,7 +296,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
head_ofs += len1;
break;
case 'd':
- v = va_arg(ap, uint32 *);
+ v = va_arg(ap, uint32_t *);
NEED_DATA(4);
*v = IVAL(blob->data, head_ofs); head_ofs += 4;
break;
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index 6abec7e8b6..df7bddcd38 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -159,7 +159,7 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
memcpy(sig->data + 12, seq_num, 4);
} else {
- uint32 crc;
+ uint32_t crc;
crc = crc32_calc_buffer((const char *)data, length);
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmssp_seq_num)) {
return NT_STATUS_NO_MEMORY;
@@ -302,7 +302,7 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
memcpy(sig->data + 4, digest, 8);
memcpy(sig->data + 12, seq_num, 4);
} else {
- uint32 crc;
+ uint32_t crc;
crc = crc32_calc_buffer((const char *)data, length);
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmssp_seq_num)) {
return NT_STATUS_NO_MEMORY;
diff --git a/source4/libcli/auth/schannel.h b/source4/libcli/auth/schannel.h
index 7b710d7cb9..74507c547d 100644
--- a/source4/libcli/auth/schannel.h
+++ b/source4/libcli/auth/schannel.h
@@ -25,7 +25,7 @@
struct schannel_state {
TALLOC_CTX *mem_ctx;
uint8 session_key[16];
- uint32 seq_num;
+ uint32_t seq_num;
BOOL initiator;
DATA_BLOB signature;
};
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index d1dd0b4ff2..803e27699f 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -51,7 +51,7 @@ static NTSTATUS cli_link_internal(struct cli_tree *tree,
/****************************************************************************
Map standard UNIX permissions onto wire representations.
****************************************************************************/
-static uint32 unix_perms_to_wire(mode_t perms)
+static uint32_t unix_perms_to_wire(mode_t perms)
{
unsigned int ret = 0;
@@ -100,8 +100,8 @@ NTSTATUS cli_unix_hardlink(struct cli_tree *tree, const char *fname_src,
****************************************************************************/
static NTSTATUS cli_unix_chmod_chown_internal(struct cli_tree *tree,
const char *fname,
- uint32 mode, uint32 uid,
- uint32 gid)
+ uint32_t mode, uint32_t uid,
+ uint32_t gid)
{
union smb_setfileinfo parms;
NTSTATUS status;
@@ -136,7 +136,7 @@ NTSTATUS cli_unix_chown(struct cli_tree *tree, const char *fname, uid_t uid,
gid_t gid)
{
return cli_unix_chmod_chown_internal(tree, fname, SMB_MODE_NO_CHANGE,
- (uint32)uid, (uint32)gid);
+ (uint32_t)uid, (uint32_t)gid);
}
@@ -224,9 +224,9 @@ NTSTATUS cli_nt_delete_on_close(struct cli_tree *tree, int fnum, BOOL flag)
Used in CIFS-on-CIFS NTVFS.
****************************************************************************/
int cli_nt_create_full(struct cli_tree *tree, const char *fname,
- uint32 CreatFlags, uint32 DesiredAccess,
- uint32 FileAttributes, uint32 ShareAccess,
- uint32 CreateDisposition, uint32 CreateOptions,
+ uint32_t CreatFlags, uint32_t DesiredAccess,
+ uint32_t FileAttributes, uint32_t ShareAccess,
+ uint32_t CreateDisposition, uint32_t CreateOptions,
uint8 SecurityFlags)
{
union smb_open open_parms;
@@ -347,7 +347,7 @@ NTSTATUS cli_close(struct cli_tree *tree, int fnum)
this is used for testing LOCKING_ANDX_CANCEL_LOCK
****************************************************************************/
NTSTATUS cli_locktype(struct cli_tree *tree, int fnum,
- uint32 offset, uint32 len, int timeout,
+ uint32_t offset, uint32_t len, int timeout,
unsigned char locktype)
{
union smb_lock parms;
@@ -375,7 +375,7 @@ NTSTATUS cli_locktype(struct cli_tree *tree, int fnum,
Lock a file.
****************************************************************************/
NTSTATUS cli_lock(struct cli_tree *tree, int fnum,
- uint32 offset, uint32 len, int timeout,
+ uint32_t offset, uint32_t len, int timeout,
enum brl_type lock_type)
{
union smb_lock parms;
@@ -402,7 +402,7 @@ NTSTATUS cli_lock(struct cli_tree *tree, int fnum,
/****************************************************************************
Unlock a file.
****************************************************************************/
-NTSTATUS cli_unlock(struct cli_tree *tree, int fnum, uint32 offset, uint32 len)
+NTSTATUS cli_unlock(struct cli_tree *tree, int fnum, uint32_t offset, uint32_t len)
{
union smb_lock parms;
struct smb_lock_entry lock[1];
diff --git a/source4/libcli/raw/clikrb5.c b/source4/libcli/raw/clikrb5.c
index 1d9c02f7f4..0d4fade295 100644
--- a/source4/libcli/raw/clikrb5.c
+++ b/source4/libcli/raw/clikrb5.c
@@ -37,10 +37,10 @@
/*
* This function is not in the Heimdal mainline.
*/
- krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds)
+ krb5_error_code krb5_set_real_time(krb5_context context, int32_t_t seconds, int32_t_t microseconds)
{
krb5_error_code ret;
- int32_t sec, usec;
+ int32_t_t sec, usec;
ret = krb5_us_timeofday(context, &sec, &usec);
if (ret)
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index ce0368c304..f265c8281d 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -42,7 +42,7 @@ uint_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
void ea_put_list(char *data, uint_t num_eas, struct ea_struct *eas)
{
int i;
- uint32 ea_size;
+ uint32_t ea_size;
ea_size = ea_list_size(num_eas, eas);
@@ -105,7 +105,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
uint_t *num_eas, struct ea_struct **eas)
{
int n;
- uint32 ea_size, ofs;
+ uint32_t ea_size, ofs;
if (blob->length < 4) {
return NT_STATUS_INFO_LENGTH_MISMATCH;
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 7d635da0dc..1030a61704 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -51,7 +51,7 @@ NTSTATUS smb_raw_changenotify_recv(struct cli_request *req,
{
struct smb_nttrans nt;
NTSTATUS status;
- uint32 ofs, i;
+ uint32_t ofs, i;
struct cli_session *session = req?req->session:NULL;
status = smb_raw_nttrans_recv(req, mem_ctx, &nt);
@@ -64,7 +64,7 @@ NTSTATUS smb_raw_changenotify_recv(struct cli_request *req,
/* count them */
for (ofs=0; nt.out.params.length - ofs > 12; ) {
- uint32 next = IVAL(nt.out.params.data, ofs);
+ uint32_t next = IVAL(nt.out.params.data, ofs);
parms->out.num_changes++;
if (next == 0 ||
ofs + next >= nt.out.params.length) break;
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 085b445fba..d8e4d80b39 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -153,7 +153,7 @@ struct cli_request *cli_request_setup_session(struct cli_session *session,
{
struct cli_request *req;
uint16 flags2;
- uint32 capabilities;
+ uint32_t capabilities;
req = cli_request_setup_transport(session->transport, command, wct, buflen);
@@ -798,7 +798,7 @@ DATA_BLOB cli_req_pull_blob(struct cli_request *req, TALLOC_CTX *mem_ctx, const
/* check that a lump of data in a request is within the bounds of the data section of
the packet */
-static BOOL cli_req_data_oob(struct cli_request *req, const char *ptr, uint32 count)
+static BOOL cli_req_data_oob(struct cli_request *req, const char *ptr, uint32_t count)
{
/* be careful with wraparound! */
if (ptr < req->in.data ||
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index 1fd91b29d7..d13a1227dd 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -320,8 +320,8 @@ NTSTATUS smb_raw_nttrans_recv(struct cli_request *req,
TALLOC_CTX *mem_ctx,
struct smb_nttrans *parms)
{
- uint32 total_data, recvd_data=0;
- uint32 total_param, recvd_param=0;
+ uint32_t total_data, recvd_data=0;
+ uint32_t total_param, recvd_param=0;
if (!cli_request_receive(req) ||
cli_request_is_error(req)) {
@@ -369,9 +369,9 @@ NTSTATUS smb_raw_nttrans_recv(struct cli_request *req,
while (recvd_data < total_data ||
recvd_param < total_param) {
- uint32 param_count, param_ofs, param_disp;
- uint32 data_count, data_ofs, data_disp;
- uint32 total_data2, total_param2;
+ uint32_t param_count, param_ofs, param_disp;
+ uint32_t data_count, data_ofs, data_disp;
+ uint32_t total_data2, total_param2;
/* parse out the total lengths again - they can shrink! */
total_param2 = IVAL(req->in.vwv, 3);
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index 5f47a5e42a..bb295ee991 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -24,7 +24,7 @@
struct smb_basic_signing_context {
DATA_BLOB mac_key;
- uint32 next_seq_num;
+ uint32_t next_seq_num;
};
/***********************************************************
diff --git a/source4/libcli/util/clierror.c b/source4/libcli/util/clierror.c
index 97436d2106..7b78d191dd 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 *ecode)
+void cli_dos_error(struct cli_state *cli, uint8 *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/dom_sid.c b/source4/libcli/util/dom_sid.c
index dbc9c20155..88ece25a8e 100644
--- a/source4/libcli/util/dom_sid.c
+++ b/source4/libcli/util/dom_sid.c
@@ -59,7 +59,7 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
return NULL;
}
- ret->sub_auths = talloc_array_p(mem_ctx, uint32, num_sub_auths);
+ ret->sub_auths = talloc_array_p(mem_ctx, uint32_t, num_sub_auths);
if (!ret->sub_auths) {
return NULL;
}
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index a257c2d0ea..11a07d45c7 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -47,7 +47,7 @@
/* NT status -> dos error map */
static const struct {
uint8 dos_class;
- uint32 dos_code;
+ uint32_t dos_code;
NTSTATUS ntstatus;
} ntstatus_to_dos_map[] = {
{ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL},
@@ -613,7 +613,7 @@ static const struct {
/* dos -> nt status error map */
static const struct {
uint8 dos_class;
- uint32 dos_code;
+ uint32_t dos_code;
NTSTATUS ntstatus;
} dos_to_ntstatus_map[] = {
{ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED},
@@ -1410,7 +1410,7 @@ static const struct {
/*****************************************************************************
convert a dos eclas/ecode to a NT status32 code
*****************************************************************************/
-NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode)
+NTSTATUS dos_to_ntstatus(uint8 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 ecode)
/*****************************************************************************
convert a NT status code to a dos class/code
*****************************************************************************/
-void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode)
+void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *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 edf1526d2e..b31f62c727 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -461,7 +461,7 @@ BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags)
returned password including termination.
************************************************************/
BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd,
- int new_pwrd_size, uint32 *new_pw_len,
+ int new_pwrd_size, uint32_t *new_pw_len,
int string_flags)
{
int byte_len=0;