diff options
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/authfile.c b/authfile.c index 0a5bae96f..66bdc0ef1 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -479,12 +479,10 @@ load_private_key(const char *filename, const char *passphrase, Key *key, | |||
479 | if (fd < 0) | 479 | if (fd < 0) |
480 | return 0; | 480 | return 0; |
481 | 481 | ||
482 | #ifndef HAVE_CYGWIN | 482 | /* check owner and modes. */ |
483 | /* | 483 | #ifdef HAVE_CYGWIN |
484 | * check owner and modes. | 484 | if (check_ntsec(filename)) |
485 | * This won't work on Windows under all circumstances so we drop | 485 | #endif |
486 | * that check for now. | ||
487 | */ | ||
488 | if (fstat(fd, &st) < 0 || | 486 | if (fstat(fd, &st) < 0 || |
489 | (st.st_uid != 0 && st.st_uid != getuid()) || | 487 | (st.st_uid != 0 && st.st_uid != getuid()) || |
490 | (st.st_mode & 077) != 0) { | 488 | (st.st_mode & 077) != 0) { |
@@ -497,7 +495,6 @@ load_private_key(const char *filename, const char *passphrase, Key *key, | |||
497 | error("It is recommended that your private key files are NOT accessible by others."); | 495 | error("It is recommended that your private key files are NOT accessible by others."); |
498 | return 0; | 496 | return 0; |
499 | } | 497 | } |
500 | #endif | ||
501 | switch (key->type) { | 498 | switch (key->type) { |
502 | case KEY_RSA: | 499 | case KEY_RSA: |
503 | if (key->rsa->e != NULL) { | 500 | if (key->rsa->e != NULL) { |