summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2002-10-28 22:07:58 +0000
committerKen Raeburn <raeburn@mit.edu>2002-10-28 22:07:58 +0000
commit86c7162799f57554cce5d9003c3a7780ad95e025 (patch)
tree4bf18e22f7a17b3c89381bef3f08bcee07efb0b3 /src/lib
parentff4d06a7473f0ea47deb7efe38378aba073e9cc5 (diff)
downloadkrb5-86c7162799f57554cce5d9003c3a7780ad95e025.tar.gz
krb5-86c7162799f57554cce5d9003c3a7780ad95e025.tar.xz
krb5-86c7162799f57554cce5d9003c3a7780ad95e025.zip
* 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14943 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/ChangeLog8
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c6
-rw-r--r--src/lib/krb5/krb/preauth.c12
-rw-r--r--src/lib/krb5/krb/preauth2.c4
4 files changed, 19 insertions, 11 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index 0a8e44035..4376c9d9a 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -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
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index a8ab3cd21..9e49990f0 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -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))
diff --git a/src/lib/krb5/krb/preauth.c b/src/lib/krb5/krb/preauth.c
index 7970b4f10..0e7c279e1 100644
--- a/src/lib/krb5/krb/preauth.c
+++ b/src/lib/krb5/krb/preauth.c
@@ -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++;
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index 1e07c18c2..440690bc9 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -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) {