summaryrefslogtreecommitdiffstats
path: root/authfile.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-05 16:13:06 +1100
committerDamien Miller <djm@mindrot.org>2000-09-05 16:13:06 +1100
commitbac2d8aa5e642a70045e713853b13d020b9c5d57 (patch)
tree98ddc81efce2273b3dfaff03b51242c988d30abf /authfile.c
parent676092fad0b6edca8f1fe731d7c3a000465a9bef (diff)
- (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c
index 71c4a5d8..4368cb94 100644
--- a/authfile.c
+++ b/authfile.c
@@ -457,7 +457,12 @@ load_private_key(const char *filename, const char *passphrase, Key *key,
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) {
@@ -470,6 +475,7 @@ load_private_key(const char *filename, const char *passphrase, Key *key,
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) {