diff options
| author | Keith Vetter <keithv@fusion.com> | 1995-09-28 00:27:12 +0000 |
|---|---|---|
| committer | Keith Vetter <keithv@fusion.com> | 1995-09-28 00:27:12 +0000 |
| commit | 47a204486ea86d2becf3adbc82536ca0511519bb (patch) | |
| tree | 228a3d8b85ac26a15c3fa0571e536153ffefb74f /src/mac/kconfig | |
| parent | db4ffe6f35df26e8c052df419c37ca5f08b2307c (diff) | |
Telnet authentication module fixes. Also project organization
cleanup.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6876 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/mac/kconfig')
| -rw-r--r-- | src/mac/kconfig/ChangeLog | 17 | ||||
| -rw-r--r-- | src/mac/kconfig/KerberosHeaders.pch | 119 | ||||
| -rw-r--r-- | src/mac/kconfig/WindowUtil.c | 2 | ||||
| -rw-r--r-- | src/mac/kconfig/autoconf.h | 84 | ||||
| -rw-r--r-- | src/mac/kconfig/kconfig.c | 37 | ||||
| -rw-r--r-- | src/mac/kconfig/kconfig.sit.hqx | 691 |
6 files changed, 382 insertions, 568 deletions
diff --git a/src/mac/kconfig/ChangeLog b/src/mac/kconfig/ChangeLog index a72619a56..09035329f 100644 --- a/src/mac/kconfig/ChangeLog +++ b/src/mac/kconfig/ChangeLog @@ -1,9 +1,18 @@ +Wed Sep 27 12:00:00 1995 John Rivlin <jrivlin@fusion.com> + + * autoconf.h: Removed this file. Now taken from libraries + directory. + + * KerberosHeaders.pch: Removed this file. Now taken from + libraries directory. + Wed Sep 20 12:00:00 1995 James Mattly <mattly@fusion.com> - * kconfig.sit.hqx: update project files to include kadm source for change - password. - * KerberosHeaders.pch: updated to handle compilation of kadm for change - password. + * kconfig.sit.hqx: update project files to include kadm source for + change password. + + * KerberosHeaders.pch: updated to handle compilation of kadm for + change password. Sun Sep 10 12:00:00 1995 James Mattly <mattly@fusion.com> diff --git a/src/mac/kconfig/KerberosHeaders.pch b/src/mac/kconfig/KerberosHeaders.pch deleted file mode 100644 index 4eb69c01d..000000000 --- a/src/mac/kconfig/KerberosHeaders.pch +++ /dev/null @@ -1,119 +0,0 @@ -/* - * KerberosHeaders.pch - * - * Script to generate the 'MacHeaders<xxx>' precompiled header for Metrowerks C/C++. - * Copyright © 1993 metrowerks inc. All rights reserved. - * Modified for Kerberos5 Mac port to include compile options - */ - -/* - * Add the compile flag switches for kerberos compile - */ -#define _MWERKS -#define _MACINTOSH -#define SIZEOF_INT 4 -#define SIZEOF_SHORT 2 -#define HAVE_SRAND -#define NO_PASSWORD -#define HAS_LABS -#define ENOMEM -1 -#define ANSI_STDIO -typedef unsigned int size_t; -#define _SIZET -#include <unix.h> -#include <ctype.h> -#define KRB5 1 - -#define PROVIDE_RSA_MD4 -#define PROVIDE_RSA_MD5 -#define PROVIDE_SNEFRU -#define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_DES_CBC_CRC -#define PROVIDE_DES_CBC_MD5 -#define PROVIDE_RAW_DES_CBC - -/* - * Rename various socket type operations to avoid cluttering the namespace - */ -#define socket krb5_socket -#define closesocket krb5_closesocket -#define connect krb5_connect -#define bind krb5_bind -#define send krb5_send -#define recv krb5_recv -#define sendto krb5_sendto -#define select krb5_select -#define recvfrom krb5_recvfrom -#define inet_ntoa krb5_inet_ntoa -#define gethostbyname krb5_gethostbyname -#define gethostbyaddr krb5_gethostbyaddr -#define gethostname krb5_gethostname -#define getsockname krb5_getsockname -#define getmyipaddr krb5_getmyipaddr - -#define OpenOurRF krb5_OpenOurRF -#define OpenResolver krb5_OpenResolver -#define CloseResolver krb5_CloseResolver -#define StrToAddr krb5_StrToAddr -#define AddrToStr krb5_AddrToStr -#define EnumCache krb5_EnumCache -#define AddrToName krb5_AddrToName -#define dnr krb5_dnr -#define codeHndl krb5_codeHndl - -typedef int datum; - -//jfm need to reimplement -#define mktemp(a) - -enum { -ENOENT = -43, -EPERM, -EACCES, -EISDIR, -ENOTDIR, -ELOOP, -ETXTBSY, -EBUSY, -EROFS, -EINVAL, -EEXIST, -EFAULT, -EBADF, -ENAMETOOLONG, -EWOULDBLOCK, -EDQUOT, -ENOSPC, -EIO, -ENFILE, -EMFILE, -ENXIO -}; -#define HAVE_STRFTIME 1 -#define MAXPATHLEN 255 -#define HAVE_SYSLOG_H 1 - -/* - * Support for automatically naming the precompiled header file ... - */ - -#ifdef __cplusplus - #ifdef powerc - #pragma precompile_target "MacKrbPPC++" - #else - #pragma precompile_target "MacKrb68K++" - #endif -#else - #ifdef powerc - #pragma precompile_target "MacKrbPPC" - #else - #pragma precompile_target "MacKrb68K" - #endif -#endif - -/* - * Now just include the "MacHeaders.c" source file ... - */ - -#include "MacHeaders.c" - diff --git a/src/mac/kconfig/WindowUtil.c b/src/mac/kconfig/WindowUtil.c index 18961382d..bda1c595a 100644 --- a/src/mac/kconfig/WindowUtil.c +++ b/src/mac/kconfig/WindowUtil.c @@ -10,7 +10,7 @@ * r.watson@utexas.edu * 512-471-3241 */ -#ifndef _MWERKS +#ifndef __MWERKS__ #include <Memory.h> #include <OSUtils.h> #include <QuickDraw.h> diff --git a/src/mac/kconfig/autoconf.h b/src/mac/kconfig/autoconf.h deleted file mode 100644 index 043021400..000000000 --- a/src/mac/kconfig/autoconf.h +++ /dev/null @@ -1,84 +0,0 @@ -/* autoconf.h. Generated automatically by configure. */ -/* autoconf.h.in. Generated automatically from configure.in by autoheader. */ - -/* #undef ANSI_STDIO */ -#define HAS_SETVBUF 1 -#define HAS_ANSI_CONST 1 -/* #undef HAS_ANSI_VOLATILE */ -#define HAS_STDLIB_H 1 -/* #undef HAS_STRDUP */ -/* #undef HAS_LABS */ -/* #undef HAS_SYS_FILE_H */ -/* #undef HAS_SYS_PARAM_H */ -#define HAS_VOID_TYPE 1 -#define KRB5_PROVIDE_PROTOTYPES 1 -/* #undef NEED_SYS_FCNTL_H */ -#define NO_NESTED_PROTOTYPES 1 -/* #undef NO_STDLIB_H */ -#define NO_YYLINENO 1 -/* #undef POSIX_FILE_LOCKS */ -/* #undef POSIX_SIGTYPE */ -/* #undef POSIX_TERMIOS */ -#define POSIX_TYPES 1 -#ifndef STDARG_PROTOTYPES -/* #undef STDARG_PROTOTYPES */ -#endif /* STDARG_PROTOTYPES -- avoid collision with com_err.h */ -#define USE_DIRENT_H 1 -#define USE_STRING_H 1 -#define WAIT_USES_INT 1 -#define krb5_sigtype void -/* #undef HAS_UNISTD_H */ -#define KRB5_USE_INET 1 -#define ODBM 1 -/* #undef TM_IN_SYS_TIME */ - -/* Define if MIT Project Athena default configuration should be used */ -/* #undef KRB5_ATHENA_COMPAT */ - -/* Define if Kerberos V4 backwards compatibility should be supported */ -/* #undef KRB5_KRB4_COMPAT */ - -/* Define to empty if the keyword does not work. */ -#define const - -/* Define if you can safely include both <sys/time.h> and <time.h>. */ -#define TIME_WITH_SYS_TIME 1 - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/* The number of bytes in a short. */ -#define SIZEOF_SHORT 2 - -/* Define if you have the <macsock.h> header file. */ -#define HAVE_MACSOCK_H 1 - -/* Define if you have the <stdarg.h> header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the <sys/file.h> header file. */ -/* #undef HAVE_SYS_FILE_H */ - -/* Define if you have the <sys/param.h> header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define if you have the <sys/stat.h> header file. */ -/* #undef HAVE_SYS_STAT_H */ - -/* Define if you have the <sys/time.h> header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define if you have the <sys/types.h> header file. */ -/* #undef HAVE_SYS_TYPES_H */ - -/* Define if you have the dbm library (-ldbm). */ -/* #undef HAVE_LIBDBM */ - -/* Define if you have the ndbm library (-lndbm). */ -/* #undef HAVE_LIBNDBM */ - -/* Define if there is no concept of user identification */ -#define NO_USERID 1 diff --git a/src/mac/kconfig/kconfig.c b/src/mac/kconfig/kconfig.c index 3fd6e6b6f..29680fccf 100644 --- a/src/mac/kconfig/kconfig.c +++ b/src/mac/kconfig/kconfig.c @@ -15,7 +15,7 @@ * Kconfig */ #include <stdio.h> -#ifndef _MWERKS +#ifndef __MWERKS__ #include <Controls.h> #include <Desk.h> #include <DiskInit.h> @@ -123,6 +123,9 @@ char *prefsFilename = "\pCNS Config Preferences"; #ifdef KRB5 char *prefsFilename = "\pCNSk5 Config Preferences"; +#define kUNKNOWNUSERNAME "Unknown" +char gUserName[255]; /* last user name */ +char gRealmName[255]; /* last realm name */ #endif /*+ @@ -186,6 +189,7 @@ int main (void) #endif #ifdef KRB5 k5_init_ccache (&k5_ccache); + strcpy(gUserName, kUNKNOWNUSERNAME); #endif readprefs(); @@ -828,8 +832,14 @@ char *ptr; strcpy(scratch, "None"); #endif #ifdef KRB5 - /* FIXME */ - strcpy(scratch, "unknown"); + if (strcmp(gUserName, kUNKNOWNUSERNAME)) + { + strcpy(scratch, gUserName); + strcat(scratch, "@"); + strcat(scratch, gRealmName); + } + else + strcpy(scratch, kUNKNOWNUSERNAME); #endif if (strcmp(scratch, olduser)) { strcpy(olduser, scratch); @@ -2231,6 +2241,10 @@ char credname[100]; char realm[100]; char *ptr; + /* if the gUserName isn't uknown, we'll use that name */ + if (strcmp(gUserName, kUNKNOWNUSERNAME)) + strcpy(usernm, gUserName); + if (GetUserInfo(usernm, passwd) == 2) return; @@ -2279,20 +2293,14 @@ char *ptr; if (server) krb5_free_principal(kcontext, server); -//jfm toss in a little error detection - if (code == 0) + if (code) { - //jfm got the ticket - ParamText("\pTicket granted.", "\p", "\p", "\p"); - Alert(128, NULL); + com_err (NULL, code, "while logging in."); } else { - //jfm failed to get the ticket - com_err (NULL, code, "while logging in."); - -// ParamText("\pTicket refused.", "\p", "\p", "\p"); -// Alert(128, NULL); + strcpy(gUserName, usernm); /* copy the user name over to the global username */ + strcpy(gRealmName, realm); /* copy the realm name over to the global realmname */ } #endif } @@ -2340,6 +2348,7 @@ void doLogout () #endif #ifdef KRB5 k5_dest_tkt(); + strcpy(gUserName, kUNKNOWNUSERNAME); #endif } @@ -2679,7 +2688,7 @@ void *state; code = profile_delete_node_relation(node, realm); /* possible memory leak here */ code = profile_add_node(node, realm, 0, &node); /* Create the realm node */ code = profile_add_node(node, "kdc", host, &node2); /* Create the realm node */ - /* what about default_domain, and admin_server? */ + code = profile_add_node(node, "admin_server", host, &node2); /* Create the realm node */ #endif } diff --git a/src/mac/kconfig/kconfig.sit.hqx b/src/mac/kconfig/kconfig.sit.hqx index 592beee13..e836ba78b 100644 --- a/src/mac/kconfig/kconfig.sit.hqx +++ b/src/mac/kconfig/kconfig.sit.hqx @@ -1,347 +1,346 @@ (This file must be converted with BinHex 4.0) -:#fYMEfjQD@FZFfPd!&0*9%46593K!!!!!$m*!!!"4QkQ8dP8)3!#!!!r#A*-BA8 -#!3!!!"B!!!d!$'YMEfjQD@FZFR0bBl8!!!!!!!!!!!!!!!!!!!!!!!"KUJ!!!!! -!!!!!!!!!!!!!!!!!!!!!-3-!!!!!rrrrre*68N0%Eh9R)3#VATi%V'1L!!!!EUJ -!!!!!!!!`I3!!!!$lq`!!!!!!!!!!$IF1`2LqXbZDNmfZXiYe91ifcflPbVhY,dI -EQPi[IkpcXmbmG9pm1Ah+DA*2lN@[k0Gj#lG6@9fFlN(X&mr1kaVS`RpjrXZkH*e -GHRQG8ElS`JdDfqaD6KIMjIPdRhPf(FYEZEr1c!1kkVUqEp,9IVJKAb*3!XN!NS8 -m*!F*0(,`b%&')%!(r(k66X35N4YH%ZR'2rLAF2kR8l1QXlIRqZj9cAhpICfV!SK -BfY%hF1@LjDIk#%Ip4dpLk)r1-*kH"ppLHib%db+88H4DUdB'V)Y$JFX[8hmG)Xq -a&Ja9A6hckPPA[q[UFlfS#A+1R(9[3!EK[9dU0HUAV"0PRA9P#G[c%i*HqAYikd+ -9#cTk1V[@DXc*dLmcV"Ae"Z%8Q5c0XQESZ)@pr32RY2IHf0(GBb*EJE1NK0-UEA) -jF#U@GA@X[C%4[b(KB`BS%*)CdMY84`8LLjC'1PDZl1[Ulhp$KER5,NZ!99D"$0m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