diff options
| author | Miro Jurisic <meeroh@mit.edu> | 1999-11-22 22:46:55 +0000 |
|---|---|---|
| committer | Miro Jurisic <meeroh@mit.edu> | 1999-11-22 22:46:55 +0000 |
| commit | 93a6c21f2f9d86949c24812918fe63b6e44e31bb (patch) | |
| tree | ef5b3af6e818361b1ba956da3a729ab4175ed056 /src | |
| parent | 0f57b11524f288643074efa77fe1e4257be86b68 (diff) | |
| download | krb5-93a6c21f2f9d86949c24812918fe63b6e44e31bb.tar.gz krb5-93a6c21f2f9d86949c24812918fe63b6e44e31bb.tar.xz krb5-93a6c21f2f9d86949c24812918fe63b6e44e31bb.zip | |
Don't need Kerberos5GlobalsLib, use CCAPI v3 instead
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11906 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
9 files changed, 0 insertions, 460 deletions
diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.c b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.c deleted file mode 100644 index a7952cfc1..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright 1998 by the Massachusetts Institute of Technology. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Furthermore if you modify this software you must label - * your software as modified software and not distribute it in such a - * fashion that it might be confused with the original M.I.T. software. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - - -/* - * Definitions for globally shared data used by the Kerberos v5 library - * - * $Header$ - */ - -#include <Types.h> -#include <Errors.h> -#include <CCache2.h> -#include <CodeFragments.h> - - -#include "Krb5GlobalsData.h" -#include "Krb5Globals.CFM.h" - -apiCB* gCCContext = nil; - -/* $Header$ */ - -/* Include MITAthenaCore for: - - prototypes for __initialize and __terminate - - resource-fork access utilities for shared libraries - */ - -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import on -#endif - - pascal OSErr __initialize (const CFragInitBlock* theInitBlock); - pascal void __terminate (void); - -/* Standard CFM initializion function prototype */ -pascal OSErr -__initialize_Kerberos5GlobalsLib ( - CFragInitBlockPtr inInitBlock); - -/* Standard CFM termination function prototype */ -pascal void -__terminate_Kerberos5GlobalsLib ( - void); - -/* CFM magic again */ -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import reset -#endif - -/* This is the initialization function. - This function is guaranteed to be called every time the library is prepared -- which - is whenever an application is launched that uses the library - In order for this to happen, the function name must be entered in the "Initialization function" - field in PPC and CFM-68K linker preferences. - - If this function returns an error code, preparation of the library fails. When preparation fails, - either the Finder displays an error message (in the case of strong linking) or library is not loaded - (in the case of weak linking). -*/ -pascal OSErr -__initialize_Kerberos5GlobalsLib ( - CFragInitBlockPtr inInitBlock) -{ - OSErr err = noErr; - cc_uint32 ccErr; - - /* Always do this first in your own initialization function -- this calls runtime - library to initialize your globals and your exceptions table */ - err = __initialize (inInitBlock); - if (err != noErr) - return err; - - ccErr = cc_initialize (&gCCContext, CC_API_VER_2, NULL, NULL); - if (ccErr != CC_NOERROR) - return memFullErr; - - gKerberos5GlobalsRefCount++; - if (gKerberos5SystemDefaultCacheName == nil) - err = Krb5GlobalsSetUniqueDefaultCacheName (); - - return err; -} - -/* This is the shared library termination function. - Here you need to undo, in the reverse order, everything you did in - the initialization function. - - This function can't fail. -*/ - -pascal void -__terminate_Kerberos5GlobalsLib ( - void) -{ - /* First, clean up your library-specific structures. - ErrorLib does nothing here, since it doesn't take ownership - of error tables */ - - cc_shutdown (&gCCContext); - - gKerberos5GlobalsRefCount--; - - /* Dispose ccache name if we are last instance */ - if ((gKerberos5GlobalsRefCount == 0) && (gKerberos5SystemDefaultCacheName != nil)) { - DisposePtr (gKerberos5SystemDefaultCacheName); - gKerberos5SystemDefaultCacheName = nil; - } - - /* Finally, cleanup exception tables and global chain */ - __terminate (); -}
\ No newline at end of file diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.h b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.h deleted file mode 100644 index dde7b3f14..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.CFM.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Global CCache context for Kerberos v5 globals library - */ - -#ifndef __Krb5Globlas_CFM_h__ -#define __Krb5Globlas_CFM_h__ - -extern apiCB* gCCContext; - -#endif /* __Krb5Globlas_CFM_h__ */
\ No newline at end of file diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c deleted file mode 100644 index 60f7ce9eb..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright 1998 by the Massachusetts Institute of Technology. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Furthermore if you modify this software you must label - * your software as modified software and not distribute it in such a - * fashion that it might be confused with the original M.I.T. software. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - - -/* - * Definitions for globally shared data used by the Kerberos v5 library - * - * $Header$ - */ - -#include <Errors.h> - -#include <CCache2.h> - -#include <string.h> -#include <stdio.h> - -#include "Krb5Globals.h" -#include "Krb5GlobalsData.h" -#include "Krb5Globals.CFM.h" - -/* - * Set the default cache name - */ - -OSStatus -Krb5GlobalsSetDefaultCacheName ( - char* inName) -{ - char* newName; - - newName = NewPtrSys (strlen (inName) + 1); - - if (newName == nil) - return MemError(); - - BlockMoveData (inName, newName, strlen (inName) + 1); - if (gKerberos5SystemDefaultCacheName != nil) - DisposePtr (gKerberos5SystemDefaultCacheName); - gKerberos5SystemDefaultCacheName = newName; - gKerberos5SystemDefaultCacheNameModification++; - return noErr; -} - -/* - * Get the default cache name - */ - -UInt32 -Krb5GlobalsGetDefaultCacheName ( - char* inName, - UInt32 inLength) -{ - if (inName != nil) { - BlockMoveData (gKerberos5SystemDefaultCacheName, inName, inLength); - inName [inLength] = '\0'; - } - return strlen (gKerberos5SystemDefaultCacheName) + 1; -} - -/* - * Set the default cache name to something unique - * (i.e. not a name of an existing ccache) - */ - -OSStatus -Krb5GlobalsSetUniqueDefaultCacheName () -{ - OSStatus err = noErr; - UInt32 i; - char name [16]; - cc_uint32 ccErr; - ccache_p* ccache; - - /* Infinite loop! I presume you won't have 2^32 ccaches... */ - for (i = 0; ;i++) { - sprintf (name, "%d", i); - ccErr = cc_open (gCCContext, name, CC_CRED_V5, 0L, &ccache); - if (ccErr == CC_NO_EXIST) { - err = Krb5GlobalsSetDefaultCacheName (name); - break; - } else if (ccErr == CC_NOERROR) { - cc_close (gCCContext, &ccache); - } else { - err = memFullErr; - break; - } - } - - return err; -} - -/* - * Return the modification number - */ - -UInt32 -Krb5GlobalsGetDefaultCacheNameModification () -{ - return gKerberos5SystemDefaultCacheNameModification; -}
\ No newline at end of file diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.exp b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.exp deleted file mode 100644 index c054c5c02..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.exp +++ /dev/null @@ -1,10 +0,0 @@ -# -# Exports for accessors for globally shared data used by Kerberos v5 library -# -# $Header$ -# - -Krb5GlobalsSetDefaultCacheName -Krb5GlobalsGetDefaultCacheName -Krb5GlobalsSetUniqueDefaultCacheName -Krb5GlobalsGetDefaultCacheNameModification diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h deleted file mode 100644 index 4696e20ae..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Decalrations for Kerberos v5 systemwide globals - * - * $Header$ - */ - -#ifndef __Krb5Globals_h__ -#define __Krb5Globals_h__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import on -#endif - -/* - * Set the default cache name - * - * inName is a C string with the name of the new cache - * - * returns: noErr, memFullErr - */ - -OSStatus -Krb5GlobalsSetDefaultCacheName ( - char* inName); - -/* - * Retrieve the default cache name - * - * inName should point to at least inLength bytes of storage - * if inName is nil, just returns the length - * - * returns: length of default cache name - */ - -UInt32 -Krb5GlobalsGetDefaultCacheName ( - char* inName, - UInt32 inLength); - -/* - * Set the default cache name to a unique string - * - * Sets the default cache name to a string that is not the name - * of an existing cache - */ - -OSStatus -Krb5GlobalsSetUniqueDefaultCacheName (); - -/* - * Get modification number - * - * Modification number changes whenever default cache name changes - */ - -UInt32 -Krb5GlobalsGetDefaultCacheNameModification (); - -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import reset -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __Krb5Globals_h__ */
\ No newline at end of file diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.html b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.html deleted file mode 100644 index 7ed835336..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.html +++ /dev/null @@ -1,81 +0,0 @@ -<!-- #include "header.html" - #TITLE#="Kerberos v5 Globals Library API Functions" - #BASEHREF#="" ---> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> - <TITLE> Kerberos v5 Globals Library API Functions </TITLE> -</HEAD> -<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#663399"> -<CENTER> - <TABLE BORDER=0 CELLSPACING=8> - <TR> - <TD><IMG SRC="http://web.mit.edu/macdev/www/is-logo.gif" ALT="MIT Information Systems"></TD> - <TD><BR><H1>Macintosh Development</H1></TD> - </TR> - </TABLE> <BR> - [<A HREF="http://web.mit.edu/macdev/www/macdev.html">Home</A>] - [<A HREF="http://web.mit.edu/macdev/www/about.html">About Us</A>] - [<A HREF="http://web.mit.edu/macdev/www/people.html">People</A>] - [<A HREF="http://web.mit.edu/macdev/www/applications.html">Applications</A>] - [<A HREF="http://web.mit.edu/macdev/www/support.html">MIT Support Library</A>] <BR> - [<A HREF="http://web.mit.edu/macdev/www/kerberos.html">MIT Kerberos</A>] - [<A HREF="http://web.mit.edu/macdev/www/macosx.html">Mac OS X</A>] - [<A HREF="http://web.mit.edu/macdev/www/documentation.html">Developer Documentation</A>] - [<A HREF="http://web.mit.edu/is/">Information Systems</A>] -<P> </CENTER> <HR> -<!-- end include --> -<TABLE BORDER=0 CELLSPACING=4> - <TR> - <TD><IMG SRC="../../Common/Documentation/graphics/MITKerberosLib.gif"></TD> - <TD><B><FONT SIZE="+3">Kerberos v5 Globals Library API Functions</FONT></B></TD> - </TR> -</TABLE> -<BLOCKQUOTE> - <FONT SIZE="+1"><CODE>OSStatus <A NAME="Krb5GlobalsSetDefaultCacheName"><B>Krb5GlobalsSetDefaultCacheName</B></A> - (char* inName);</CODE></FONT><BR> - <BLOCKQUOTE> - Krb5GlobalsSetDefaultCacheName sets the systemwide default cache for the Kerberos 5 - library to <CODE>inName</CODE>. - <P> - If successful, the function returns <CODE>noErr</CODE>. If it fails to allocate - memory for the cache name, it returns <CODE>memFullErr</CODE>. - </BLOCKQUOTE> - <FONT SIZE="+1"><CODE>UInt32 <A HREF = "Krb5GlobalsGetDefaultCacheName"><B>Krb5GlobalsGetDefaultCacheName</B></A> - (char* inName, UInt32 inLength); -</CODE></FONT> - <BLOCKQUOTE> - Krb5GlobalsGetDefaultCacheName returns the name of the current systemwide default - credentials cache for the Kerberos v5 library. <CODE>inName</CODE> should point - to at least <CODE>inLength</CODE> bytes of memory. Actual length of the cache - name is returned. <P> - If <CODE>inName</CODE> is <CODE>nil</CODE>, the length of the cache name is - returned. - </BLOCKQUOTE> - <FONT SIZE="+1"><CODE>OSStatus <A NAME="Krb5GlobalsSetUniqueDefaultCacheName"><B>Krb5GlobalsSetUniqueDefaultCacheName</B></A> - ();</CODE></FONT><BR> - <BLOCKQUOTE> - Krb5GlobalsSetUniqueDefaultCacheName sets the systemwide default credentials cache - name for Kerberos v5 library to a unique string (i.e., one that is not the name - of any of the existing credentials caches). - <P> - If successful, the function returns <CODE>noErr</CODE>. If it fails to allocate - memory for the cache name, it returns <CODE>memFullErr</CODE>. - </BLOCKQUOTE> - <FONT SIZE="+1"><CODE>UInt32 <A NAME="Krb5GlobalsGetDefaultCacheNameModification"><B>Krb5GlobalsGetDefaultCacheNameModification</B></A> - ();</CODE></FONT><BR> - <BLOCKQUOTE> - Krb5GlobalsGetDefaultCacheNameModification returns modification counter for the - systemwide default credentials cache name for the Kerberos v5 library. If result - of two calls to Krb5GlobalsGetDefaultCacheNameModification is different, the - default cache name has changed between them. - </BLOCKQUOTE> -</BLOCKQUOTE> -<!-- #include "footer.html" --> -<P> <HR> <FONT SIZE="+1"> <B> Questions or comments? Send mail to -<A HREF="mailto:macdev@mit.edu">macdev@mit.edu</A> </B> </FONT> <BR> -Last updated on $Date$ <BR> -Last modified by $Author$ -</BODY> </HTML> -<!-- end include --> diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c deleted file mode 100644 index 09b082259..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Definitions for globally shared data used by the Kerberos v5 library - * - * $Header$ - */ - -#include "Krb5GlobalsData.h" - -UInt32 gKerberos5GlobalsRefCount = 0; -UInt32 gKerberos5SystemDefaultCacheNameModification = 0; -char* gKerberos5SystemDefaultCacheName = nil; - diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.exp b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.exp deleted file mode 100644 index 10bc009b2..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.exp +++ /dev/null @@ -1,9 +0,0 @@ -# -# Exports for globally shared data used by Kerberos v5 library -# -# $Header$ -# - -gKerberos5GlobalsRefCount -gKerberos5SystemDefaultCacheName -gKerberos5SystemDefaultCacheNameModification diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h deleted file mode 100644 index 41f7106db..000000000 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Declarations for globally shared data used by Kerberos v5 library - * - * $Header$ - */ - -#ifndef __Krb5GlobalsData_h__ -#define __Krb5GlobalsData_h__ - -#include <Types.h> - -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import on -#endif - -extern UInt32 gKerberos5GlobalsRefCount; -extern char* gKerberos5SystemDefaultCacheName; -extern UInt32 gKerberos5SystemDefaultCacheNameModification; - -#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -# pragma import reset -#endif - -#endif /* __Krb5GlobalsData_h__ */
\ No newline at end of file |
