preauth.c: Add const and casts as needed to handle warnings..
authorEzra Peisach <epeisach@mit.edu>
Sun, 5 May 1996 13:47:06 +0000 (13:47 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 5 May 1996 13:47:06 +0000 (13:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7901 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/preauth.c

index 9eece7a0836c118c4e3ccf57c42e7cd8fd110828..374796dc96e18817715b9d0b062cc7d1814e5548 100644 (file)
@@ -1,3 +1,7 @@
+Sun May  5 09:46:18 1996  Ezra Peisach  (epeisach@kangaroo.mit.edu)
+
+       * preauth.c: Add casts and const keywords as needed.
+
 Fri May  3 00:15:18 1996  Mark Eichin  <eichin@cygnus.com>
 
        * get_creds.c (krb5_get_credentials_core): new function. Common
index a266d9bc9883ea6cc7c8b2b8702eec1f0a4b9a38..4fd19c0369c33f9f13f23998d0d5a611734005cc 100644 (file)
@@ -161,7 +161,7 @@ krb5_error_code krb5_obtain_padata(context, preauth_to_use, key_proc,
     for (pa = preauth_to_use, size=0; *pa; pa++, size++) {
        if ((*pa)->pa_type == KRB5_PADATA_ETYPE_INFO) {
            scratch.length = (*pa)->length;
-           scratch.data = (*pa)->contents;
+           scratch.data = (char *) (*pa)->contents;
            retval = decode_krb5_etype_info(&scratch, &etype_info);
            if (retval)
                return retval;
@@ -179,7 +179,7 @@ krb5_error_code krb5_obtain_padata(context, preauth_to_use, key_proc,
     salt.length = -1;
     if (etype_info) {
        enctype = etype_info[0]->etype;
-       salt.data = etype_info[0]->salt;
+       salt.data = (char *) etype_info[0]->salt;
        salt.length = etype_info[0]->length;
     }
     if (salt.length == -1) {
@@ -323,7 +323,7 @@ obtain_enc_ts_padata(context, in_padata, etype_info, def_enc_key,
     pa->magic = KV5M_PA_DATA;
     pa->pa_type = KRB5_PADATA_ENC_TIMESTAMP;
     pa->length = scratch->length;
-    pa->contents = scratch->data;
+    pa->contents = (krb5_octet *) scratch->data;
 
     *out_padata = pa;
 
@@ -391,7 +391,7 @@ find_pa_system(type, preauth)
 } 
 
 
-extern char *krb5_default_pwd_prompt1;
+extern const char *krb5_default_pwd_prompt1;
 
 static krb5_error_code
 sam_get_pass_from_user(context, etype_info, key_proc, key_seed, request,
@@ -406,7 +406,7 @@ sam_get_pass_from_user(context, etype_info, key_proc, key_seed, request,
 {
     krb5_enctype               enctype;
     krb5_error_code            retval;
-    char *oldprompt;
+    const char *oldprompt;
 
     /* enctype = request->ktype[0]; */
     enctype = ENCTYPE_DES_CBC_MD5;
@@ -509,7 +509,7 @@ obtain_sam_padata(context, in_padata, etype_info, def_enc_key,
     char * prompt;
 
     tmpsam.length = in_padata->length;
-    tmpsam.data = in_padata->contents;
+    tmpsam.data = (char *) in_padata->contents;
     retval = decode_krb5_sam_challenge(&tmpsam, &sam_challenge);
     if (retval)
       return retval;
@@ -595,7 +595,7 @@ obtain_sam_padata(context, in_padata, etype_info, def_enc_key,
     pa->magic = KV5M_PA_DATA;
     pa->pa_type = KRB5_PADATA_SAM_RESPONSE;
     pa->length = scratch->length;
-    pa->contents = scratch->data;
+    pa->contents = (krb5_octet *) scratch->data;
     scratch = 0;               /* so we don't free it! */
 
     *out_padata = pa;