Fix all our warnings at -O6 on an x86_64 box.
authorjra <jra@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sat, 18 Feb 2006 00:27:31 +0000 (00:27 +0000)
committerjra <jra@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sat, 18 Feb 2006 00:27:31 +0000 (00:27 +0000)
Jeremy.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_0@13553 0c0555d6-39d7-0310-84fc-f1cc0bd64818

source/include/hmacmd5.h
source/include/ntdomain.h
source/include/rpc_misc.h
source/libsmb/credentials.c
source/libsmb/smbencrypt.c
source/rpc_server/srv_lsa_nt.c
source/rpc_server/srv_netlog_nt.c
source/utils/passwd_util.c

index 6b53a6fd0741398f534af04b4e7c2ae2be6d7086..89ea3fed803fd356cefa7cc2d7c32c2dfeff3db2 100644 (file)
 
 #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 */
index 82e212c0ca0a966abcf8b31f9afc594a7688be62..c27ec3675b4f590d36c37a76b6eb505f27602b6f 100644 (file)
@@ -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;
 };
 
index 7b71e80c55345f975900da31a94b107db2787378..bad2089ac7b13d794b5e37a4b6a86dce55df5c4e 100644 (file)
@@ -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 */
index 975f9bca499e37e4d1f2777534028b27fb3faf2e..76fc5fc062127d641af3a2ce53220eec03d63647 100644 (file)
@@ -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) {
index 5bdd0acd3ea6edd2fbf4fe934baacf55fd734a8f..ddfe696b48eaf66be3e43383410a9fed5b1af712 100644 (file)
@@ -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];
index a9886363d2c077772143d0473b777547087591a2..bdfb742f7a047328b48a923e31f8b331fda60615 100644 (file)
@@ -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;
index af1f0ebdcf9044222f6921ba4977e08e22b14c2f..1813fd6c1e5e1450a293e316f62d63c528aec1fe 100644 (file)
@@ -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. */
index e98d017cd61d9c8f655b9ba71c0d43c17d23949f..8ce83ecbf480937d4c0eaaf842511b2709142ecb 100644 (file)
@@ -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) {