if (fd < 0)
return 0;
- /* check owner and modes */
+#ifndef HAVE_CYGWIN
+ /*
+ * check owner and modes.
+ * This won't work on Windows under all circumstances so we drop
+ * that check for now.
+ */
if (fstat(fd, &st) < 0 ||
(st.st_uid != 0 && st.st_uid != getuid()) ||
(st.st_mode & 077) != 0) {
error("It is recommended that your private key files are NOT accessible by others.");
return 0;
}
+#endif
switch (key->type) {
case KEY_RSA:
if (key->rsa->e != NULL) {