summaryrefslogtreecommitdiffstats
path: root/authfile.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
committerDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
commitb70b61f5fecf37d95e031414849745030fa8a420 (patch)
tree33a92aca5fde66bde1c3bb3cdabfc5a4c27e24ab /authfile.c
parent52cbcbf0bb5ee685f77449f68c59926320bfe85f (diff)
- (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/authfile.c b/authfile.c
index 0a5bae96..66bdc0ef 100644
--- a/authfile.c
+++ b/authfile.c
@@ -479,12 +479,10 @@ load_private_key(const char *filename, const char *passphrase, Key *key,
if (fd < 0)
return 0;
-#ifndef HAVE_CYGWIN
- /*
- * check owner and modes.
- * This won't work on Windows under all circumstances so we drop
- * that check for now.
- */
+ /* check owner and modes. */
+#ifdef HAVE_CYGWIN
+ if (check_ntsec(filename))
+#endif
if (fstat(fd, &st) < 0 ||
(st.st_uid != 0 && st.st_uid != getuid()) ||
(st.st_mode & 077) != 0) {
@@ -497,7 +495,6 @@ 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) {