From dd47d25e5d7f7830d0593e4e52fba2b7ea7fd063 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 22 Jun 2013 17:37:46 -0400 Subject: [PATCH] libkrb5: No fchmod on Windows There is no fchmod() implementation on Windows. For now prevent its use on Windows with #ifndef _WIN32 but in the future set_default_cache() should be updated to set ownership permissions for the cache file. Change-Id: I57214dfecbd25d7b337a568fa5e522c0a22dbb76 --- lib/krb5/dcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/krb5/dcache.c b/lib/krb5/dcache.c index 4cb4a4291..5711846c8 100644 --- a/lib/krb5/dcache.c +++ b/lib/krb5/dcache.c @@ -92,10 +92,12 @@ set_default_cache(krb5_context context, krb5_dcache *dc, const char *residual) goto out; } rk_cloexec(fd); +#ifndef _WIN32 if (fchmod(fd, S_IRUSR | S_IWUSR) < 0) { ret = errno; goto out; } +#endif len = strlen(residual); iov[0].iov_base = rk_UNCONST(residual);