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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user