+2003-03-06 Alexandra Ellwood <lxs@mit.edu>
+ * des.h, krb.h: Removed deprecated KfM functions. They will be
+ exported but not in the headers to discourage new callers. Removed
+ enumsalwaysint because there are no typed enums in this header.
+
+ * des.h: Made afs_string_to_key public on all platforms. (OpenAFS
+ folk think this is okay.)
+
+ * krb.h, prot.h: Made KRB_TICKET_GRANTING_TICKET public and
+ removed non-public TICKET_GRANTING_TICKET because this macro is
+ used in lots of places by KfM, including some clients. Made
+ krb__get_srvtabname non-private because it is used by KEYFILE.
+
+ * kadm.h: moved definition of MAXHOSTNAMELEN below the inclusion
+ of other headers so that if it gets defined by those other
+ headers or headers they include, we don't get a redefinition
+ error (this happens on Mac OS X).
+
2003-02-12 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (krb_err.h, kadm_err.h): Rebuild by going to
#if TARGET_OS_MAC
# if defined(__MWERKS__)
# pragma import on
-# pragma enumsalwaysint on
# endif
# pragma options align=mac68k
#endif
des_cbc_cksum(const des_cblock *, des_cblock *, unsigned long,
const des_key_schedule, const des_cblock *);
int KRB5_CALLCONV des_string_to_key (const char *, C_Block);
+void afs_string_to_key(char *, char *, des_cblock);
/* XXX ABI change: used to return krb5_error_code */
int KRB5_CALLCONV des_read_password(des_cblock *, char *, int);
int des_is_weak_key(des_cblock);
void des_cblock_print_file(des_cblock *, FILE *fp);
-#if TARGET_OS_MAC
-
-/*
- * Stuff ported from KfM follows...
- */
-
-void afs_string_to_key(char *, char *, des_cblock);
-
-/*
- * AFS string2key support; they should be considered internal, but KfM
- * exposes them.
- */
-char *des_crypt(const char *, const char *);
-char *des_fcrypt(const char *, const char *, char *);
-int des_set_key(des_cblock *, des_key_schedule);
-
-/*
- * internal used by des_read_password, but kfm exposes it
- */
-int KRB5_CALLCONV des_read_pw_string(char *, int, char *, int);
-
-void des_3cbc_encrypt(des_cblock *, des_cblock *, long, des_key_schedule, des_key_schedule, des_key_schedule, des_cblock *, int);
-void des_3ecb_encrypt(des_cblock *, des_cblock *, des_key_schedule, des_key_schedule, des_key_schedule, int);
-
-/*
- * Should be internal to crypto/des/f_sched.c, but KfM exposes it.
- */
-int make_key_sched(des_cblock *, des_key_schedule);
-
-/*
- * XXX need to implement the following three:
- */
-void des_generate_random_block(des_cblock);
-void des_set_random_generator_seed(des_cblock);
-void des_set_sequence_number(des_cblock);
-
-#endif /* TARGET_OS_MAC */
-
#if TARGET_OS_MAC
# if defined(__MWERKS__)
-# pragma enumsalwaysint reset
# pragma import reset
# endif
# pragma options align=reset
* Doug Church, December 28, 1989, MIT Project Athena
*/
-/* for those broken Unixes without this defined... should be in sys/param.h */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 64
-#endif
-
#include <sys/types.h>
#include "port-sockets.h"
#include <kerberosIV/krb.h>
#include <kerberosIV/des.h>
+/* for those broken Unixes without this defined... should be in sys/param.h */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 64
+#endif
+
/* The global structures for the client and server */
typedef struct {
struct sockaddr_in admin_addr;
#ifndef KRB_DEFS
#define KRB_DEFS
-#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
-# include <TargetConditionals.h>
-# if TARGET_RT_MAC_CFM
-# error "Use KfM 4.0 SDK headers for CFM compilation."
-# endif
-#endif
-
/*
* For MacOS, don't expose prototypes of various private functions.
* Unfortuantely, they've leaked out everywhere else.
*/
#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
+# include <TargetConditionals.h>
+# if TARGET_RT_MAC_CFM
+# error "Use KfM 4.0 SDK headers for CFM compilation."
+# endif
# ifndef KRB_PRIVATE
# define KRB_PRIVATE 0
# endif
#define DEFAULT_TKT_LIFE 120 /* default lifetime for krb_mk_req */
#endif
+#define KRB_TICKET_GRANTING_TICKET "krbtgt"
+
/* Definition of text structure used to pass text around */
#define MAX_KTXT_LEN 1250
char *session, int life, long time_sec,
char *sname, char *sinstance, C_Block key);
+#endif /* KRB_PRIVATE */
+
+/* This function is used by KEYFILE above. Do not call it directly */
extern char * krb__get_srvtabname(const char *);
+#if KRB_PRIVATE
+
extern int krb_kntoln(AUTH_DAT *, char *);
#ifdef KRB5_GENERAL__
#endif /* KRB_PRIVATE */
-/* FSp-glue.c */
-#if TARGET_OS_MAC && defined(__FILES__)
-int KRB5_CALLCONV FSp_krb_get_svc_in_tkt(char *, char *, char *, char *,
- char *, int, const FSSpec *);
-int KRB5_CALLCONV FSp_put_svc_key(const FSSpec *, char *, char *, char *,
- int, char *);
-int KRB5_CALLCONV FSp_read_service_key(char *, char *, char *,
- int, const FSSpec*, char *);
-#endif
-
-#if TARGET_OS_MAC
-/*
- * KfM krb.hin had the following, probably inherited from CNS:
- *
- * The following functions are not part of the standard Kerberos v4
- * API. They were created for Mac implementation, and used by admin
- * tools such as CNS-Config.
- */
-extern int KRB5_CALLCONV
-krb_get_num_cred(void);
-
-extern int KRB5_CALLCONV
-krb_get_nth_cred(char *, char *, char *, int);
-
-extern int KRB5_CALLCONV
-krb_delete_cred(char *, char *,char *);
-
-extern int KRB5_CALLCONV
-dest_all_tkts(void);
-
-#endif /* TARGET_OS_MAC */
-
/*
* krb_change_password -- merged from KfM
*/
#if TARGET_OS_MAC
# if defined(__MWERKS__)
-# pragma enumsalwaysint reset
# pragma import reset
# endif
# pragma options align=reset
#define KRB_PROT_VERSION 4
#define MAX_PKT_LEN 1000
#define MAX_TXT_LEN 1000
-#define TICKET_GRANTING_TICKET "krbtgt"
/* Macro's to obtain various fields from a packet */