* k5-int.h (krb5_ser_handle): Now points to const.
authorKen Raeburn <raeburn@mit.edu>
Thu, 31 Oct 2002 22:54:00 +0000 (22:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 31 Oct 2002 22:54:00 +0000 (22:54 +0000)
(krb5_kt_dfl_ops): Now const.
(struct _krb5_kt_ops): Field serializer now points to const krb5_ser_entry
instead of void.
* krb5.hin (struct _krb5_kt): Field ops now points to const.
* kt_file.c (krb5_ktf_ops, krb5_ktf_writable_ops): Now const.  Drop cast of
serializer entry initializer.
(fopen_mode_rbplus, fopen_mode_rb): Now const.
* kt_srvtab.c (krb5_kts_ops): Now const.
* ktbase.c (krb5_ktf_ops, krb5_kts_ops): Update declarations.
(struct krb5_kt_typelist): Field ops now points to const.

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

src/include/ChangeLog
src/include/k5-int.h
src/include/krb5.hin
src/lib/krb5/keytab/ChangeLog
src/lib/krb5/keytab/kt_file.c
src/lib/krb5/keytab/kt_srvtab.c
src/lib/krb5/keytab/ktbase.c

index 6c6e507429e6ae3f73c326d02aa81508422ff3c7..94b426519a1f6aea1bcb12f631f7fc695ae1effa 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-31  Ken Raeburn  <raeburn@mit.edu>
+
+       * k5-int.h (krb5_ser_handle): Now points to const.
+       (krb5_kt_dfl_ops): Now const.
+       (struct _krb5_kt_ops): Field serializer now points to const
+       krb5_ser_entry instead of void.
+       * krb5.hin (struct _krb5_kt): Field ops now points to const.
+
 2002-10-30  Ken Hornstein  <kenh@cmf.nrl.navy.mil>
 
        * krb5.hin: Change definitions of new SAM preauth types to
index 0ee5dd9a8c9d6b690b35ee4496d20f167a8ffe74..e6d69205cdbe711a164104d74e6dd742da4f1510 100644 (file)
@@ -1525,7 +1525,7 @@ struct __krb5_serializer {
                                                         krb5_octet **,
                                                         size_t *);
 };
-typedef struct __krb5_serializer * krb5_ser_handle;
+typedef const struct __krb5_serializer * krb5_ser_handle;
 typedef struct __krb5_serializer krb5_ser_entry;
 
 krb5_ser_handle krb5_find_serializer
@@ -1793,10 +1793,10 @@ typedef struct _krb5_kt_ops {
                  krb5_keytab_entry *);
 
     /* Handle for serializer */
-    void * serializer;
+    const krb5_ser_entry *serializer;
 } krb5_kt_ops;
 
-extern krb5_kt_ops krb5_kt_dfl_ops;
+extern const krb5_kt_ops krb5_kt_dfl_ops;
 
 extern krb5_error_code krb5int_translate_gai_error (int);
 
index ceb5a47b8b1be810f52c35305e3ef933ff93a171..a1fb9261760866608a046e3b0b001d1a08121091 100644 (file)
@@ -1328,7 +1328,7 @@ typedef struct krb5_keytab_entry_st {
 struct _krb5_kt_ops;
 typedef struct _krb5_kt {      /* should move into k5-int.h */
     krb5_magic magic;
-    struct _krb5_kt_ops *ops;
+    const struct _krb5_kt_ops *ops;
     krb5_pointer data;
 } *krb5_keytab;
 #else
index 203eb1f74026b0814a691dac6b2c737614b918a8..7112d7f90b064292d435ff735937763bf49c0ee0 100644 (file)
@@ -1,3 +1,12 @@
+2002-10-31  Ken Raeburn  <raeburn@mit.edu>
+
+       * kt_file.c (krb5_ktf_ops, krb5_ktf_writable_ops): Now const.
+       Drop cast of serializer entry initializer.
+       (fopen_mode_rbplus, fopen_mode_rb): Now const.
+       * kt_srvtab.c (krb5_kts_ops): Now const.
+       * ktbase.c (krb5_ktf_ops, krb5_kts_ops): Update declarations.
+       (struct krb5_kt_typelist): Field ops now points to const.
+
 2002-09-03  Ken Raeburn  <raeburn@mit.edu>
 
        * kt_file.c, kt_srvtab.c, ktadd.c, ktbase.c, ktdefault.c,
index 732933cb28ad2be190f2508a12f960e171145001..47050798a1d72bf3877207a337d584118291f240 100644 (file)
@@ -63,8 +63,8 @@ typedef struct _krb5_ktfile_data {
 #define KTFILEP(id) (((krb5_ktfile_data *)(id)->data)->openf)
 #define KTVERSION(id) (((krb5_ktfile_data *)(id)->data)->version)
 
-extern struct _krb5_kt_ops krb5_ktf_ops;
-extern struct _krb5_kt_ops krb5_ktf_writable_ops;
+extern const struct _krb5_kt_ops krb5_ktf_ops;
+extern const struct _krb5_kt_ops krb5_ktf_writable_ops;
 
 krb5_error_code KRB5_CALLCONV krb5_ktfile_resolve 
        (krb5_context,
@@ -849,7 +849,7 @@ krb5_ktfile_remove(krb5_context context, krb5_keytab id, krb5_keytab_entry *entr
  * krb5_ktf_ops
  */
 
-struct _krb5_kt_ops krb5_ktf_ops = {
+const struct _krb5_kt_ops krb5_ktf_ops = {
     0,
     "FILE",    /* Prefix -- this string should not appear anywhere else! */
     krb5_ktfile_resolve,
@@ -861,14 +861,14 @@ struct _krb5_kt_ops krb5_ktf_ops = {
     krb5_ktfile_end_get,
     0,
     0,
-    (void *) &krb5_ktfile_ser_entry
+    &krb5_ktfile_ser_entry
 };
 
 /*
  * krb5_ktf_writable_ops
  */
 
-struct _krb5_kt_ops krb5_ktf_writable_ops = {
+const struct _krb5_kt_ops krb5_ktf_writable_ops = {
     0,
     "WRFILE",  /* Prefix -- this string should not appear anywhere else! */
     krb5_ktfile_wresolve,
@@ -880,14 +880,14 @@ struct _krb5_kt_ops krb5_ktf_writable_ops = {
     krb5_ktfile_end_get,
     krb5_ktfile_add,
     krb5_ktfile_remove,
-    (void *) &krb5_ktfile_ser_entry
+    &krb5_ktfile_ser_entry
 };
 
 /*
  * krb5_kt_dfl_ops
  */
 
-krb5_kt_ops krb5_kt_dfl_ops = {
+const krb5_kt_ops krb5_kt_dfl_ops = {
     0,
     "FILE",    /* Prefix -- this string should not appear anywhere else! */
     krb5_ktfile_resolve,
@@ -899,7 +899,7 @@ krb5_kt_ops krb5_kt_dfl_ops = {
     krb5_ktfile_end_get,
     0,
     0,
-    (void *) &krb5_ktfile_ser_entry
+    &krb5_ktfile_ser_entry
 };
 
 /*
@@ -987,11 +987,11 @@ krb5_kt_vno krb5_kt_default_vno = KRB5_KT_DEFAULT_VNO;
 #define xfread(a, b, c, d) fread((char *)a, b, (unsigned) c, d)
 
 #ifdef ANSI_STDIO
-static char *fopen_mode_rbplus= "rb+";
-static char *fopen_mode_rb = "rb";
+static char *const fopen_mode_rbplus= "rb+";
+static char *const fopen_mode_rb = "rb";
 #else
-static char *fopen_mode_rbplus= "r+";
-static char *fopen_mode_rb = "r";
+static char *const fopen_mode_rbplus= "r+";
+static char *const fopen_mode_rb = "r";
 #endif
 
 static krb5_error_code
index 56019058b5c2b676e9c661044adb6eaf2905c364..b516614e69234fa8d8ee911d1994a48ef23f8a89 100644 (file)
@@ -54,7 +54,7 @@ typedef struct _krb5_ktsrvtab_data {
 #define KTFILENAME(id) (((krb5_ktsrvtab_data *)(id)->data)->name)
 #define KTFILEP(id) (((krb5_ktsrvtab_data *)(id)->data)->openf)
 
-extern struct _krb5_kt_ops krb5_kts_ops;
+extern const struct _krb5_kt_ops krb5_kts_ops;
 
 static krb5_error_code KRB5_CALLCONV krb5_ktsrvtab_resolve
        (krb5_context,
@@ -333,7 +333,7 @@ krb5_ktsrvtab_end_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *curs
  * krb5_kts_ops
  */
 
-struct _krb5_kt_ops krb5_kts_ops = {
+const struct _krb5_kt_ops krb5_kts_ops = {
     0,
     "SRVTAB",  /* Prefix -- this string should not appear anywhere else! */
     krb5_ktsrvtab_resolve,
index 15ab7fe83bb54ae60a226a9b6a8fc99b10e841c8..41f473d47ceaa80976b823922a9bc3cebc2f5103 100644 (file)
 
 #include "k5-int.h"
 
-extern krb5_kt_ops krb5_ktf_ops;
-extern krb5_kt_ops krb5_kts_ops;
+extern const krb5_kt_ops krb5_ktf_ops;
+extern const krb5_kt_ops krb5_kts_ops;
 
 struct krb5_kt_typelist {
-    krb5_kt_ops *ops;
+    const krb5_kt_ops *ops;
     struct krb5_kt_typelist *next;
 };
 static struct krb5_kt_typelist krb5_kt_typelist_file  = {