scp client and server ported to work in Windows

Lot of code had to be redone as scp.exe contains both the scp client and
scp server in the same binary working in Windows needs various file
system access related changes. sshd_config file needs to add "scp"
subsystem path like we do for sftp server.
This commit is contained in:
quamrulmina 2015-12-07 00:31:07 -06:00
parent 298c353755
commit 68677bb603
3 changed files with 1715 additions and 3 deletions

View File

@ -1676,8 +1676,8 @@ int peekPipeRead(int sfd)
if (!ret)
{
error("PeekNamedPipe on sfd [%d] failed with error code [%d]",
sfd, GetLastError());
//error("PeekNamedPipe on sfd [%d] failed with error code [%d]",
// sfd, GetLastError());
return 0;
}

1706
scp.c

File diff suppressed because it is too large Load Diff

8
ssh.c
View File

@ -2063,6 +2063,14 @@ ssh_session2_open(void)
window >>= 1;
packetmax >>= 1;
}
#ifdef WIN32_FIXME
else {
// make stdio duplicated ports of above binary mode so no CRLF xlate
_setmode(sfd_to_fd(in), O_BINARY);
_setmode(sfd_to_fd(out), O_BINARY);
}
#endif
c = channel_new(
"session", SSH_CHANNEL_OPENING, in, out, err,
window, packetmax, CHAN_EXTENDED_WRITE,