diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-05 16:13:06 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-05 16:13:06 +1100 |
commit | bac2d8aa5e642a70045e713853b13d020b9c5d57 (patch) | |
tree | 98ddc81efce2273b3dfaff03b51242c988d30abf /authfile.c | |
parent | 676092fad0b6edca8f1fe731d7c3a000465a9bef (diff) |
- (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c index 71c4a5d84..4368cb941 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -457,7 +457,12 @@ load_private_key(const char *filename, const char *passphrase, Key *key, | |||
457 | if (fd < 0) | 457 | if (fd < 0) |
458 | return 0; | 458 | return 0; |
459 | 459 | ||
460 | /* check owner and modes */ | 460 | #ifndef HAVE_CYGWIN |
461 | /* | ||
462 | * check owner and modes. | ||
463 | * This won't work on Windows under all circumstances so we drop | ||
464 | * that check for now. | ||
465 | */ | ||
461 | if (fstat(fd, &st) < 0 || | 466 | if (fstat(fd, &st) < 0 || |
462 | (st.st_uid != 0 && st.st_uid != getuid()) || | 467 | (st.st_uid != 0 && st.st_uid != getuid()) || |
463 | (st.st_mode & 077) != 0) { | 468 | (st.st_mode & 077) != 0) { |
@@ -470,6 +475,7 @@ load_private_key(const char *filename, const char *passphrase, Key *key, | |||
470 | error("It is recommended that your private key files are NOT accessible by others."); | 475 | error("It is recommended that your private key files are NOT accessible by others."); |
471 | return 0; | 476 | return 0; |
472 | } | 477 | } |
478 | #endif | ||
473 | switch (key->type) { | 479 | switch (key->type) { |
474 | case KEY_RSA: | 480 | case KEY_RSA: |
475 | if (key->rsa->e != NULL) { | 481 | if (key->rsa->e != NULL) { |