From: Miro Jurisic Date: Thu, 11 Mar 1999 21:18:47 +0000 (+0000) Subject: Added modification counter X-Git-Tag: krb5-1.1-beta1~303 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2929ff788eec4687ab6d79eb1d32aa8c3e6d0735;p=krb5.git Added modification counter git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11259 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c index 69efe42d3..45116c15f 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.c @@ -50,6 +50,7 @@ Krb5GlobalsSetDefaultCacheName ( if (gKerberos5SystemDefaultCacheName != nil) DisposePtr (gKerberos5SystemDefaultCacheName); gKerberos5SystemDefaultCacheName = newName; + gKerberos5SystemDefaultCacheNameModification++; return noErr; } @@ -99,4 +100,14 @@ Krb5GlobalsSetUniqueDefaultCacheName () } 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 index 846352e26..c054c5c02 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.exp +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.exp @@ -7,3 +7,4 @@ Krb5GlobalsSetDefaultCacheName Krb5GlobalsGetDefaultCacheName Krb5GlobalsSetUniqueDefaultCacheName +Krb5GlobalsGetDefaultCacheNameModification diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h index e51480fca..4696e20ae 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5Globals.h @@ -50,6 +50,15 @@ Krb5GlobalsGetDefaultCacheName ( 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 diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c index 440b8b75c..09b082259 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.c @@ -7,5 +7,6 @@ #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 index 51eed7269..10bc009b2 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.exp +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.exp @@ -6,3 +6,4 @@ gKerberos5GlobalsRefCount gKerberos5SystemDefaultCacheName +gKerberos5SystemDefaultCacheNameModification diff --git a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h index 65055cde3..41f7106db 100644 --- a/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h +++ b/src/mac/libraries/Kerberos v5 Globals/Krb5GlobalsData.h @@ -15,6 +15,7 @@ extern UInt32 gKerberos5GlobalsRefCount; extern char* gKerberos5SystemDefaultCacheName; +extern UInt32 gKerberos5SystemDefaultCacheNameModification; #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) # pragma import reset