From b43743d44700175572dfcb186c18e91c3771c034 Mon Sep 17 00:00:00 2001 From: Keith Vetter Date: Tue, 30 May 1995 17:38:16 +0000 Subject: [PATCH] Changes to get kadm working on the PC git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5915 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/ChangeLog | 6 ++++++ src/include/krb5/adm_proto.h | 2 ++ src/include/krb5/k5-config.h | 3 ++- src/lib/kadm/ChangeLog | 5 +++++ src/lib/kadm/Makefile.in | 33 ++++++++++++++++++++++++--------- src/lib/kadm/adm_conn.c | 6 ++++++ 6 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index dd9b6a195..43b57d53c 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,3 +1,9 @@ +Tue May 30 10:22:57 1995 Keith Vetter (keithv@fusion.com) + + * adm_proto.h: conditionally removed for Windows two prototypes + that use the database. + * k5-config.h: bumped MAXPATHLEN and removed need for the kdb.h file. + Fri May 26 10:17:12 1995 Keith Vetter (keithv@fusion.com) * adm_proto.h: added more missing INTERFACE. diff --git a/src/include/krb5/adm_proto.h b/src/include/krb5/adm_proto.h index 40beb6691..cfebb8217 100644 --- a/src/include/krb5/adm_proto.h +++ b/src/include/krb5/adm_proto.h @@ -43,6 +43,7 @@ void INTERFACE krb5_adm_disconnect krb5_auth_context *, krb5_ccache)); +#if ! defined(_WINDOWS) /* adm_kw_dec.c */ krb5_error_code krb5_adm_proto_to_dbent PROTOTYPE((krb5_context, @@ -60,6 +61,7 @@ krb5_error_code krb5_adm_dbent_to_proto char *, krb5_int32 *, krb5_data **)); +#endif /* _WINDOWS */ /* adm_kt_dec.c */ krb5_error_code krb5_adm_proto_to_ktent diff --git a/src/include/krb5/k5-config.h b/src/include/krb5/k5-config.h index 364269ac7..f4d94e41c 100644 --- a/src/include/krb5/k5-config.h +++ b/src/include/krb5/k5-config.h @@ -41,6 +41,7 @@ #define INI_KRB5_CONF "krb5.ini" /* Location of krb5.conf file */ #define KRB5_DBM_COMPAT__ /* Don't load dbm.h */ +#define KRB5_KDB5__ /* Don't load kdb.h */ #define KRB5_KDB5_DBM__ /* Don't load kdb_dbm.h */ #define BITS16 @@ -48,7 +49,7 @@ #define SIZEOF_SHORT 2 #define SIZEOF_LONG 4 #define MAXHOSTNAMELEN 512 -#define MAXPATHLEN 128 +#define MAXPATHLEN 256 /* Also for Windows temp files */ #define KRB5_USE_INET #define MSDOS_FILESYSTEM diff --git a/src/lib/kadm/ChangeLog b/src/lib/kadm/ChangeLog index 441a77ed8..fde8da17f 100644 --- a/src/lib/kadm/ChangeLog +++ b/src/lib/kadm/ChangeLog @@ -1,3 +1,8 @@ +Tue May 30 10:35:07 1995 Keith Vetter (keithv@fusion.com) + + * adm_conn.c: used Windows specific way of creating a temp file. + * Makefile.in: PC doesn't need to compile adm_kw_*.c files. + Thu May 25 17:49:06 1995 Keith Vetter (keithv@fusion.com) First pass to make the code compile cleanly on the PC. diff --git a/src/lib/kadm/Makefile.in b/src/lib/kadm/Makefile.in index b86bd691b..4dc2b70f7 100644 --- a/src/lib/kadm/Makefile.in +++ b/src/lib/kadm/Makefile.in @@ -5,21 +5,28 @@ LDFLAGS = -g ##DOSLIBNAME=kadm.lib ##DOS!include $(BUILDTOP)\config\windows.in -OBJS= adm_conn.$(OBJEXT) \ - adm_kw_dec.$(OBJEXT) \ - adm_kw_enc.$(OBJEXT) \ +BASE_OBJS= adm_conn.$(OBJEXT) \ adm_kt_dec.$(OBJEXT) \ adm_kt_enc.$(OBJEXT) \ adm_rw.$(OBJEXT) +DBOBJS= adm_kw_dec.$(OBJEXT) \ + adm_kw_enc.$(OBJEXT) + +OBJS= $(BASE_OBJS) $(DB_OBJS) + SRCS= $(srcdir)/adm_conn.c \ - $(srcdir)/adm_kw_dec.c \ - $(srcdir)/adm_kw_enc.c \ $(srcdir)/adm_kt_dec.c \ $(srcdir)/adm_kt_enc.c \ - $(srcdir)/adm_rw.c + $(srcdir)/adm_rw.c \ + $(srcdir)/adm_kw_dec.c \ + $(srcdir)/adm_kw_enc.c -all:: $(OBJS) +all:: all-$(WHAT) $(BASE_OBJS) + +all-unix:: $(DB_OBJS) +all-mac:: $(DB_OBJS) +all-windows:: libkadm.a: $(OBJS) $(RM) $@ @@ -33,8 +40,13 @@ install:: libkadm.a $(INSTALL_DATA) libkadm.a $(DESTDIR)$(KRB5_LIBDIR)/libkadm.a $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/libkadm.a -clean:: +clean:: clean-$(WHAT) +clean-unix:: + $(RM) libkadm.$(LIBEXT) +clean-mac:: $(RM) libkadm.$(LIBEXT) +clean-windows:: + $(RM) kadm.lib kadm.bak # # t_dbentry @@ -68,7 +80,10 @@ check-mac:: check-windows:: -clean:: +clean-unix:: + $(RM) t_dbentry$(EXEEXT) t_dbentry.$(OBJEXT) + $(RM) t_ktentry$(EXEEXT) t_ktentry.$(OBJEXT) +clean-mac:: $(RM) t_dbentry$(EXEEXT) t_dbentry.$(OBJEXT) $(RM) t_ktentry$(EXEEXT) t_ktentry.$(OBJEXT) diff --git a/src/lib/kadm/adm_conn.c b/src/lib/kadm/adm_conn.c index c3979a03d..9acdf0ee2 100644 --- a/src/lib/kadm/adm_conn.c +++ b/src/lib/kadm/adm_conn.c @@ -91,7 +91,13 @@ kadm_get_ccache(kcontext, user, ccache, client) if (kret = krb5_parse_name(kcontext, name, client)) goto cleanup; +#ifdef _WINDOWS + strcpy (new_cache, "FILE:"); + GetTempFileName (0, "tkt", 0, new_cache+5); +#else (void) sprintf(new_cache, kadm_cache_name_fmt, getpid()); +#endif /* _WINDOWS */ + if (kret = krb5_cc_resolve(kcontext, new_cache, ccache)) goto cleanup; -- 2.26.2