* get_in_tkt.c (conf_yes, conf_no): Now const. References updated.
authorKen Raeburn <raeburn@mit.edu>
Mon, 28 Oct 2002 22:07:58 +0000 (22:07 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 28 Oct 2002 22:07:58 +0000 (22:07 +0000)
* preauth.c (preauth_systems): Now const.  References updated.
* preauth2.c (pa_types): Now const.
(krb5_do_preauth): Local array paorder now const.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14943 dc483132-0cff-0310-8789-dd5450dbe970

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

index 0a8e44035e154375dc784702c5fb348f80a5b5f7..4376c9d9a5af1a1d0a32f2bc7d85937d10dcff05 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-28  Ken Raeburn  <raeburn@mit.edu>
+
+       * get_in_tkt.c (conf_yes, conf_no): Now const.  References
+       updated.
+       * preauth.c (preauth_systems): Now const.  References updated.
+       * preauth2.c (pa_types): Now const.
+       (krb5_do_preauth): Local array paorder now const.
+
 2002-10-28  Sam Hartman  <hartmans@mit.edu>
 
        * gic_keytab.c (krb5_get_init_creds_keytab): Don't allow failure
index a8ab3cd21b368de4528add403885014a63b2458f..9e49990f0b7ccbc07dc95e672a73627ea987a9d2 100644 (file)
@@ -591,12 +591,12 @@ cleanup:
    is yet. */
 
 /* XXX Duplicating this is annoying; try to work on a better way.*/
-static const char *conf_yes[] = {
+static const char *const conf_yes[] = {
     "y", "yes", "true", "t", "1", "on",
     0,
 };
 
-static const char *conf_no[] = {
+static const char *const conf_no[] = {
     "n", "no", "false", "nil", "0", "off",
     0,
 };
@@ -604,7 +604,7 @@ static const char *conf_no[] = {
 int
 _krb5_conf_boolean(const char *s)
 {
-    const char **p;
+    const char *const *p;
 
     for(p=conf_yes; *p; p++) {
        if (!strcasecmp(*p,s))
index 7970b4f10873a8534de0c3bd2f0b56e96f577355..0e7c279e143cf856e40d667d5a9bdc81835ccc1b 100644 (file)
@@ -83,7 +83,7 @@ static krb5_error_code obtain_sam_padata
         krb5_kdc_req *,
         krb5_pa_data **);
 
-static krb5_preauth_ops preauth_systems[] = {
+static const krb5_preauth_ops preauth_systems[] = {
     {
        KV5M_PREAUTH_OPS,
        KRB5_PADATA_ENC_TIMESTAMP,
@@ -116,7 +116,7 @@ static krb5_preauth_ops preauth_systems[] = {
 };
 
 static krb5_error_code find_pa_system
-    (krb5_preauthtype type, krb5_preauth_ops **Preauth_proc);
+    (krb5_preauthtype type, const krb5_preauth_ops **Preauth_proc);
 
 /* some typedef's for the function args to make things look a bit cleaner */
 
@@ -138,7 +138,7 @@ krb5_error_code krb5_obtain_padata(krb5_context context, krb5_pa_data **preauth_
     krb5_pa_data **            pa;
     krb5_pa_data **            send_pa_list;
     krb5_pa_data **            send_pa;
-    krb5_preauth_ops           *ops;
+    const krb5_preauth_ops     *ops;
     krb5_keyblock *            def_enc_key = 0;
     krb5_enctype               enctype;
     krb5_data                  salt;
@@ -240,7 +240,7 @@ krb5_error_code
 krb5_process_padata(krb5_context context, krb5_kdc_req *request, krb5_kdc_rep *as_reply, git_key_proc key_proc, krb5_const_pointer keyseed, git_decrypt_proc decrypt_proc, krb5_keyblock **decrypt_key, krb5_creds *creds, krb5_int32 *do_more)
 {
     krb5_error_code            retval = 0;
-    krb5_preauth_ops *                 ops;
+    const krb5_preauth_ops *   ops;
     krb5_pa_data **            pa;
     krb5_int32                 done = 0;
     
@@ -350,9 +350,9 @@ process_pw_salt(krb5_context context, krb5_pa_data *padata, krb5_kdc_req *reques
 }
     
 static krb5_error_code
-find_pa_system(krb5_preauthtype type, krb5_preauth_ops **preauth)
+find_pa_system(krb5_preauthtype type, const krb5_preauth_ops **preauth)
 {
-    krb5_preauth_ops *ap = preauth_systems;
+    const krb5_preauth_ops *ap = preauth_systems;
     
     while ((ap->type != -1) && (ap->type != type))
        ap++;
index 1e07c18c2efa6ba10fe98f3eb35b68f31b1516b4..440690bc996af3c6f47e4142aaabe220304bbfb4 100644 (file)
@@ -792,7 +792,7 @@ krb5_error_code pa_sam_2(krb5_context context,
    return(0);
 }
 
-static pa_types_t pa_types[] = {
+static const pa_types_t pa_types[] = {
     {
        KRB5_PADATA_PW_SALT,
        pa_salt,
@@ -839,7 +839,7 @@ krb5_do_preauth(krb5_context context,
     krb5_data scratch;
     krb5_etype_info etype_info = NULL;
     krb5_error_code ret;
-    static int paorder[] = { PA_INFO, PA_REAL };
+    static const int paorder[] = { PA_INFO, PA_REAL };
     int realdone;
 
     if (in_padata == NULL) {