(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
+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
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
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);
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
+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,
#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,
* 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,
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,
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,
krb5_ktfile_end_get,
0,
0,
- (void *) &krb5_ktfile_ser_entry
+ &krb5_ktfile_ser_entry
};
/*
#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
#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,
* 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,
#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 = {