From b98e54ce131b84b92a737676bf2254d38019090c Mon Sep 17 00:00:00 2001 From: Miro Jurisic Date: Sat, 20 Feb 1999 00:24:44 +0000 Subject: [PATCH] Added get_from_os for MacOS git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11192 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ccdefname.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/lib/krb5/os/ccdefname.c b/src/lib/krb5/os/ccdefname.c index be88f695d..64d7a4697 100644 --- a/src/lib/krb5/os/ccdefname.c +++ b/src/lib/krb5/os/ccdefname.c @@ -73,18 +73,6 @@ static int get_from_registry(char *name_buf, int name_size) } #endif -#ifdef macintosh -static krb5_error_code get_from_os(char *name_buf, int name_size) -{ -#if defined(_WIN32) - if (get_from_registry(name_buf, name_size)) - return 0; -#endif - strcpy(name_buf, "API:default_cache_name"); - return 0; -} -#endif - #if defined(_MSDOS) || defined(_WIN32) static krb5_error_code get_from_os(char *name_buf, int name_size) { @@ -106,7 +94,18 @@ static krb5_error_code get_from_os(char *name_buf, int name_size) } #endif -#if !(defined(_MSDOS) || defined(_WIN32) || defined(macintosh)) +#if defined (macintosh) + +static krb5_error_code get_from_os(char *name_buf, int name_size) +{ + if (name_size < 4) + return ENOMEM; + Krb5GlobalsGetDefaultCacheName (name_buf + 4, name_size - 4); + memcpy (name_buf, "API:", 4); + return 0; +} + +#elif !(defined(_MSDOS) || defined(_WIN32) static krb5_error_code get_from_os(char *name_buf, int name_size) { sprintf(name_buf, "FILE:/tmp/krb5cc_%d", getuid()); -- 2.26.2