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
This commit is contained in:
quamrulmina 2015-12-11 16:23:31 -06:00
parent 702daceea7
commit 750b52e4d4
1 changed files with 2 additions and 3 deletions

View File

@ -1598,19 +1598,18 @@ read_config_file(const char *filename, struct passwd *pw, const char *host,
if ((f = fopen(filename, "r")) == NULL)
return 0;
#ifndef WIN32_FIXME
if (flags & SSHCONF_CHECKPERM) {
struct stat sb;
if (fstat(fileno(f), &sb) == -1)
fatal("fstat %s: %s", filename, strerror(errno));
#ifndef WIN32_FIXME
if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
(sb.st_mode & 022) != 0))
fatal("Bad owner or permissions on %s", filename);
#endif
}
#endif
debug("Reading configuration data %.200s", filename);
/*