From d6adaa775f3a6ca07e39c6ddce28daa7782358af Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Wed, 26 Aug 2009 14:38:36 -0400 Subject: [PATCH] No geteuid() on Windows --- lib/krb5/context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/krb5/context.c b/lib/krb5/context.c index c6454335a..f3f3d1a72 100644 --- a/lib/krb5/context.c +++ b/lib/krb5/context.c @@ -319,9 +319,8 @@ krb5_init_context(krb5_context *context) goto out; #endif #ifdef NEED_SOCK_INIT - if (SOCK_INIT) { + if (SOCK_INIT) p->flags |= KRB5_CTX_F_SOCKETS_INITIALIZED; - } #endif out: @@ -1297,9 +1296,11 @@ _krb5_homedir_access(krb5_context context) { krb5_boolean allow; +#ifdef HAVE_GETEUID /* is never allowed for root */ if (geteuid() == 0) return FALSE; +#endif if (context && (context->flags & KRB5_CTX_F_HOMEDIR_ACCESS) == 0) return FALSE;