summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 17:50:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:16 -0500
commitfcd718c7d8a6850ae8719f23ed044b06b57501cd (patch)
tree78fe8265d44c4644b01963784a37f4505785fb97 /source4/libcli/auth
parentf88bf54c7f6d1c2ef833047eb8327953c304b5ff (diff)
downloadsamba-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/auth')
-rw-r--r--source4/libcli/auth/credentials.c8
-rw-r--r--source4/libcli/auth/credentials.h2
-rw-r--r--source4/libcli/auth/ntlm_check.c8
-rw-r--r--source4/libcli/auth/ntlmssp.c6
-rw-r--r--source4/libcli/auth/ntlmssp.h2
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c20
-rw-r--r--source4/libcli/auth/schannel.c2
-rw-r--r--source4/libcli/auth/schannel.h2
-rw-r--r--source4/libcli/auth/session.c2
9 files changed, 26 insertions, 26 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));