From: Alexandra Ellwood Date: Fri, 15 Aug 2008 22:17:09 +0000 (+0000) Subject: mac port of kim should not depend on kipc X-Git-Tag: krb5-1.7-alpha1~486 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b88f3ab8a09d818ae4b38d90da4f2fadae78ae2;p=krb5.git mac port of kim should not depend on kipc kipc is not necessarily built ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20663 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/lib/kim_ccache.c b/src/kim/lib/kim_ccache.c index a3949229a..0bfcfb08e 100644 --- a/src/kim/lib/kim_ccache.c +++ b/src/kim/lib/kim_ccache.c @@ -967,6 +967,7 @@ kim_error kim_ccache_set_default (kim_ccache io_ccache) environment_ccache); } } else { +#ifdef USE_CCAPI kim_string type = NULL; kim_string name = NULL; cc_context_t cc_context = NULL; @@ -975,6 +976,7 @@ kim_error kim_ccache_set_default (kim_ccache io_ccache) err = kim_ccache_get_type (io_ccache, &type); if (!err && strcmp (type, "API")) { +#endif kim_string display_name = NULL; /* Not a CCAPI ccache; can't set to default */ @@ -986,6 +988,7 @@ kim_error kim_ccache_set_default (kim_ccache io_ccache) } kim_string_free (&display_name); +#ifdef USE_CCAPI } if (!err) { @@ -1011,6 +1014,7 @@ kim_error kim_ccache_set_default (kim_ccache io_ccache) if (cc_ccache ) { cc_ccache_release (cc_ccache); } kim_string_free (&name); kim_string_free (&type); +#endif } } diff --git a/src/kim/lib/mac/kim_os_identity.c b/src/kim/lib/mac/kim_os_identity.c index 02f953d6c..8088be183 100644 --- a/src/kim/lib/mac/kim_os_identity.c +++ b/src/kim/lib/mac/kim_os_identity.c @@ -25,7 +25,7 @@ */ #include -#include +#include #include "kim_os_private.h" @@ -38,7 +38,7 @@ kim_error kim_os_identity_create_for_username (kim_identity *out_identity) if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); } if (!err) { - struct passwd *pw = getpwuid (kipc_session_get_session_uid ()); + struct passwd *pw = getpwuid (getuid ()); if (pw) { err = kim_identity_create_from_string (out_identity, pw->pw_name); } else {