summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/hmacmd5.h10
-rw-r--r--source3/include/ntdomain.h6
-rw-r--r--source3/include/rpc_misc.h2
-rw-r--r--source3/libsmb/credentials.c8
-rw-r--r--source3/libsmb/smbencrypt.c2
-rw-r--r--source3/rpc_server/srv_lsa_nt.c20
-rw-r--r--source3/rpc_server/srv_netlog_nt.c4
-rw-r--r--source3/utils/passwd_util.c2
8 files changed, 26 insertions, 28 deletions
diff --git a/source3/include/hmacmd5.h b/source3/include/hmacmd5.h
index 6b53a6fd07..89ea3fed80 100644
--- a/source3/include/hmacmd5.h
+++ b/source3/include/hmacmd5.h
@@ -21,12 +21,10 @@
#ifndef _HMAC_MD5_H
-typedef struct
-{
- struct MD5Context ctx;
- uchar k_ipad[65];
- uchar k_opad[65];
-
+typedef struct {
+ struct MD5Context ctx;
+ unsigned char k_ipad[65];
+ unsigned char k_opad[65];
} HMACMD5Context;
#endif /* _HMAC_MD5_H */
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 82e212c0ca..c27ec3675b 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -140,8 +140,8 @@ struct dcinfo {
DOM_CHAL clnt_chal; /* Client credential */
DOM_CHAL srv_chal; /* Server credential */
- uchar sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
- uchar mach_pw[16]; /* md4(machine password) */
+ unsigned char sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
+ unsigned char mach_pw[16]; /* md4(machine password) */
fstring mach_acct; /* Machine name we've authenticated. */
@@ -187,7 +187,7 @@ struct kerberos_auth_struct {
/* auth state for schannel. */
struct schannel_auth_struct {
- uchar sess_key[16];
+ unsigned char sess_key[16];
uint32 seq_num;
};
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 7b71e80c55..bad2089ac7 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -324,7 +324,7 @@ typedef struct log_info {
/* DOM_CHAL - challenge info */
typedef struct chal_info {
- uchar data[8]; /* credentials */
+ unsigned char data[8]; /* credentials */
} DOM_CHAL;
/* DOM_CREDs - timestamped client or server credentials */
diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c
index 975f9bca49..76fc5fc062 100644
--- a/source3/libsmb/credentials.c
+++ b/source3/libsmb/credentials.c
@@ -43,7 +43,7 @@ char *credstr(const unsigned char *cred)
static void creds_init_128(struct dcinfo *dc,
const DOM_CHAL *clnt_chal_in,
const DOM_CHAL *srv_chal_in,
- const char mach_pw[16])
+ const unsigned char mach_pw[16])
{
unsigned char zero[4], tmp[16];
HMACMD5Context ctx;
@@ -95,7 +95,7 @@ static void creds_init_128(struct dcinfo *dc,
static void creds_init_64(struct dcinfo *dc,
const DOM_CHAL *clnt_chal_in,
const DOM_CHAL *srv_chal_in,
- const char mach_pw[16])
+ const unsigned char mach_pw[16])
{
uint32 sum[2];
unsigned char sum2[8];
@@ -176,13 +176,13 @@ void creds_server_init(uint32 neg_flags,
struct dcinfo *dc,
DOM_CHAL *clnt_chal,
DOM_CHAL *srv_chal,
- const char mach_pw[16],
+ const unsigned char mach_pw[16],
DOM_CHAL *init_chal_out)
{
DEBUG(10,("creds_server_init: neg_flags : %x\n", (unsigned int)neg_flags));
DEBUG(10,("creds_server_init: client chal : %s\n", credstr(clnt_chal->data) ));
DEBUG(10,("creds_server_init: server chal : %s\n", credstr(srv_chal->data) ));
- dump_data_pw("creds_server_init: machine pass", (const unsigned char *)mach_pw, 16);
+ dump_data_pw("creds_server_init: machine pass", mach_pw, 16);
/* Generate the session key and the next client and server creds. */
if (neg_flags & NETLOGON_NEG_128BIT) {
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index 5bdd0acd3e..ddfe696b48 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -534,7 +534,7 @@ BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
Decode an arc4 encrypted password change buffer.
************************************************************/
-void encode_or_decode_arc4_passwd_buffer(char pw_buf[532], const DATA_BLOB *psession_key)
+void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key)
{
struct MD5Context tctx;
unsigned char key_out[16];
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index a9886363d2..bdfb742f7a 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -137,12 +137,12 @@ static int init_dom_ref(DOM_R_REF *ref, const char *dom_name, DOM_SID *dom_sid)
static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
DOM_R_REF *ref,
DOM_RID *prid,
- int num_entries,
+ uint32 num_entries,
const UNISTR2 *name,
int flags,
- int *pmapped_count)
+ uint32 *pmapped_count)
{
- int mapped_count, i;
+ uint32 mapped_count, i;
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
@@ -212,12 +212,12 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
static NTSTATUS lookup_lsa_sids(TALLOC_CTX *mem_ctx,
DOM_R_REF *ref,
LSA_TRANSLATED_SID3 *trans_sids,
- int num_entries,
+ uint32 num_entries,
const UNISTR2 *name,
int flags,
- int *pmapped_count)
+ uint32 *pmapped_count)
{
- int mapped_count, i;
+ uint32 mapped_count, i;
SMB_ASSERT(num_entries <= MAX_LOOKUP_SIDS);
@@ -1030,7 +1030,7 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP
{
struct lsa_info *handle;
UNISTR2 *names = q_u->uni_name;
- int num_entries = q_u->num_entries;
+ uint32 num_entries = q_u->num_entries;
DOM_R_REF *ref;
DOM_RID *rids;
uint32 mapped_count = 0;
@@ -1090,7 +1090,7 @@ NTSTATUS _lsa_lookup_names2(pipes_struct *p, LSA_Q_LOOKUP_NAMES2 *q_u, LSA_R_LOO
{
struct lsa_info *handle;
UNISTR2 *names = q_u->uni_name;
- int num_entries = q_u->num_entries;
+ uint32 num_entries = q_u->num_entries;
DOM_R_REF *ref;
DOM_RID *rids;
DOM_RID2 *rids2;
@@ -1163,7 +1163,7 @@ NTSTATUS _lsa_lookup_names3(pipes_struct *p, LSA_Q_LOOKUP_NAMES3 *q_u, LSA_R_LOO
{
struct lsa_info *handle;
UNISTR2 *names = q_u->uni_name;
- int num_entries = q_u->num_entries;
+ uint32 num_entries = q_u->num_entries;
DOM_R_REF *ref = NULL;
LSA_TRANSLATED_SID3 *trans_sids = NULL;
uint32 mapped_count = 0;
@@ -1224,7 +1224,7 @@ lsa_reply_lookup_names4.
NTSTATUS _lsa_lookup_names4(pipes_struct *p, LSA_Q_LOOKUP_NAMES4 *q_u, LSA_R_LOOKUP_NAMES4 *r_u)
{
UNISTR2 *names = q_u->uni_name;
- int num_entries = q_u->num_entries;
+ uint32 num_entries = q_u->num_entries;
DOM_R_REF *ref = NULL;
LSA_TRANSLATED_SID3 *trans_sids = NULL;
uint32 mapped_count = 0;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index af1f0ebdcf..1813fd6c1e 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -338,7 +338,7 @@ NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u)
p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- (const char *)p->dc->mach_pw,
+ p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
@@ -416,7 +416,7 @@ NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u)
p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- (const char *)p->dc->mach_pw,
+ p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
diff --git a/source3/utils/passwd_util.c b/source3/utils/passwd_util.c
index e98d017cd6..8ce83ecbf4 100644
--- a/source3/utils/passwd_util.c
+++ b/source3/utils/passwd_util.c
@@ -57,7 +57,7 @@ char *stdin_new_passwd( void)
Used if the '-s' (smbpasswd) or '-t' (pdbedit) option is set
to silently get passwords to enable scripting.
*************************************************************/
-char *get_pass( char *prompt, BOOL stdin_get)
+char *get_pass( const char *prompt, BOOL stdin_get)
{
char *p;
if (stdin_get) {