Skip to content

Commit 750b52e

Browse files
committed
Fixed #23: ssh does not work properly with ~/.ssh/config file
Fixed the issue as ssh.exe was trapping if config file was in the user's home directory. User ssh client "config" file can be given by locating it in the user's home directory/.ssh/config . Typically it is /users/johndoe/.ssh/config
1 parent 702dace commit 750b52e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

readconf.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1598,19 +1598,18 @@ read_config_file(const char *filename, struct passwd *pw, const char *host,
15981598
if ((f = fopen(filename, "r")) == NULL)
15991599
return 0;
16001600

1601+
#ifndef WIN32_FIXME
16011602
if (flags & SSHCONF_CHECKPERM) {
16021603
struct stat sb;
16031604

16041605
if (fstat(fileno(f), &sb) == -1)
16051606
fatal("fstat %s: %s", filename, strerror(errno));
16061607

1607-
#ifndef WIN32_FIXME
16081608
if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
16091609
(sb.st_mode & 022) != 0))
16101610
fatal("Bad owner or permissions on %s", filename);
1611-
#endif
16121611
}
1613-
1612+
#endif
16141613
debug("Reading configuration data %.200s", filename);
16151614

16161615
/*

0 commit comments

Comments
 (0)