Ported upstream changes

This commit is contained in:
Manoj Ampalam 2017-11-16 14:08:23 -08:00
parent 2846d75e56
commit 549d532c09
5 changed files with 11 additions and 7 deletions

View File

@ -435,7 +435,7 @@
/* #undef HAVE_GETOPT_OPTRESET */ /* #undef HAVE_GETOPT_OPTRESET */
/* Define if your libraries define getpagesize() */ /* Define if your libraries define getpagesize() */
#define HAVE_GETPAGESIZE 1 /* #undef HAVE_GETPAGESIZE */
/* Define to 1 if you have the `getpeereid' function. */ /* Define to 1 if you have the `getpeereid' function. */
/* #undef HAVE_GETPEEREID */ /* #undef HAVE_GETPEEREID */

View File

@ -75,7 +75,7 @@
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-irix.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-irix.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-linux.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-linux.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-tun.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-net.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.c" />
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\reallocarray.c" /> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\reallocarray.c" />
@ -125,7 +125,7 @@
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-irix.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-irix.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-linux.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-linux.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-tun.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-net.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.h" />
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\rmd160.h" /> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\rmd160.h" />

View File

@ -129,7 +129,7 @@
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.c"> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-tun.c"> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-net.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c"> <ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c">
@ -278,7 +278,7 @@
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.h"> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-solaris.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-tun.h"> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-net.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.h"> <ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.h">

4
sftp.c
View File

@ -2544,8 +2544,10 @@ main(int argc, char **argv)
} }
break; break;
} }
if (argv + 1)
/* TODO: need to debug this. this parameter doesn't make sense
file2 = *(argv + 1); file2 = *(argv + 1);
*/
if (!*host) { if (!*host) {
fprintf(stderr, "Missing hostname\n"); fprintf(stderr, "Missing hostname\n");

2
ssh.c
View File

@ -1915,6 +1915,7 @@ ssh_session2(struct ssh *ssh, struct passwd *pw)
* NB. this can only happen after LocalCommand has completed, * NB. this can only happen after LocalCommand has completed,
* as it may want to write to stdout. * as it may want to write to stdout.
*/ */
#ifndef WINDOWS /* TODO - implement dup2 for Windows */
if (!need_controlpersist_detach) { if (!need_controlpersist_detach) {
if ((devnull = open(_PATH_DEVNULL, O_WRONLY)) == -1) if ((devnull = open(_PATH_DEVNULL, O_WRONLY)) == -1)
error("%s: open %s: %s", __func__, error("%s: open %s: %s", __func__,
@ -1924,6 +1925,7 @@ ssh_session2(struct ssh *ssh, struct passwd *pw)
if (devnull > STDERR_FILENO) if (devnull > STDERR_FILENO)
close(devnull); close(devnull);
} }
#endif
/* /*
* If requested and we are not interested in replies to remote * If requested and we are not interested in replies to remote